Skip to content

Commit

Permalink
Merge pull request #340 from Sakuk3/patch-1
Browse files Browse the repository at this point in the history
Fix: Reference Error due to Typo in Variable Name
  • Loading branch information
duracelltomi authored Apr 3, 2024
2 parents d995a1b + 6f45cac commit d007f06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/gtm4wp-woocommerce.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function gtm4wp_woocommerce_handle_cart_qty_change() {
productdata.quantity = current_value - original_value;
productdata.price = productdata.price;

gtm4wp_push_ecommerce( 'add_to_cart', [ product_data ], {
gtm4wp_push_ecommerce( 'add_to_cart', [ productdata ], {
'currency': gtm4wp_currency, // ga4 version
'value': productdata.price * productdata.quantity
});
Expand All @@ -42,7 +42,7 @@ function gtm4wp_woocommerce_handle_cart_qty_change() {
productdata.quantity = original_value - current_value;
productdata.price = productdata.price;

gtm4wp_push_ecommerce( 'remove_from_cart', [ product_data ], {
gtm4wp_push_ecommerce( 'remove_from_cart', [ productdata ], {
'currency': gtm4wp_currency,
'value': productdata.price * productdata.quantity
});
Expand Down

0 comments on commit d007f06

Please sign in to comment.