Apple Pay domain verification failed
-
Hi Support team,
Recently we have one error on our WordPress dashboard. Below is the full error:-
“Apple Pay domain verification failed. Please check the log to see the issue. (Logging must be enabled to see recorded logs)”
When I clicked on the logs below error is display:-
2021-09-14T13:59:30+00:00 CRITICAL syntax error, unexpected ‘$order_total’ (T_VARIABLE) in /home1/officec1/public_html/wp-content/themes/flatsome/functions.php on line 65
2021-09-14T13:59:31+00:00 CRITICAL syntax error, unexpected ‘$order_total’ (T_VARIABLE) in /home1/officec1/public_html/wp-content/themes/flatsome/functions.php on line 65
When I go to this file and check the code on 65 lines, below codes are there:-
add_action(‘wp_head’, ‘bks_head_social_tracking_code’);
function bks_head_social_tracking_code() {
// Check if its thank you page.
if(is_wc_endpoint_url( ‘order-received’ )) {
// Get order object.
$order = wc_get_order(get_query_var(‘order-received’));// Get total.
$order_total = $order->get_total();// Prepare.
$output = ”
<script>
gtag(‘event’, ‘conversion’, {
‘send_to’: ‘AW-1043540229/3GEKCIvXwM0CEIXSzPED’,
‘value’: “. $order_total .”, // Use dynamically.
‘currency’: ‘USD’,
‘transaction_id’: ”
});</script>”;
// echo.
echo $output;
}
}Can you please help me with that? Let me know if you need any other information from my side!
Thank you!
RupalThe page I need help with: [log in to see the link]
- The topic ‘Apple Pay domain verification failed’ is closed to new replies.