JS error in WC checkout
-
Hello Duracelltomi,
I’m using your great plugin with WC integration and only data layer injection.
On the checkout page (https://wp-ok.it/checkout/) I have a JS error:Uncaught ReferenceError: jQuery is not defined at (index):707
The code there is:
<script data-cfasync='false' type='text/javascript'> (function($) { if ( $( '.gtm4wp_productdata' ).length > 0 ) { for( var i=0; i<dataLayer.length; i++ ) { if ( dataLayer[ i ][ 'ecomm_prodid' ] ) { break; } } if ( i == dataLayer.length ) { // no existing dyn remarketing data found in the datalayer i = 0; dataLayer[ i ][ 'ecomm_prodid' ] = []; } if ( typeof dataLayer[ i ][ 'ecomm_prodid' ].push == 'undefined' ) { return false; } var productdata; $( '.gtm4wp_productdata' ).each( function() { productdata = jQuery( this ); dataLayer[ i ][ 'ecomm_prodid' ].push( '' + productdata.data( 'gtm4wp_product_id' ) ); }); } })(jQuery); </script>
Is this a bug of the plugin or am I missing something?
Note that I have CloudFlare active.Thanks
WP-OKThe page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘JS error in WC checkout’ is closed to new replies.