From e7a4b5c76a9e017da010d33ec8130804d4422f87 Mon Sep 17 00:00:00 2001 From: Torben Lundsgaard Date: Tue, 14 May 2024 14:24:04 +0200 Subject: [PATCH] Fix items in add_shipping_info and add_payment_info --- assets/integration/woocommerce-checkout.js | 2 +- src/js/woocommerce-checkout.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/integration/woocommerce-checkout.js b/assets/integration/woocommerce-checkout.js index bda0483..09e52ba 100644 --- a/assets/integration/woocommerce-checkout.js +++ b/assets/integration/woocommerce-checkout.js @@ -1 +1 @@ -function gtmkitLoadCheckout(){window.gtmkit_data.wc.is_cart&>mkitCart(),window.gtmkit_data.wc.is_checkout&>mkitCheckout()}function gtmkitCart(){document.addEventListener("click",function(t){t=t.target;if(!t||!t.closest("[name=update_cart]"))return!0;gtmkitCartQuantityChange()}),document.addEventListener("keypress",function(t){t=t.target;if(!t||!t.closest(".woocommerce-cart-form input[type=number]"))return!0;gtmkitCartQuantityChange()})}function gtmkitCartQuantityChange(){const i=window.gtmkit_settings.datalayer_name;document.querySelectorAll(".product-quantity input.qty").forEach(function(t){var e=t.defaultValue;let n=parseInt(t.value);e!==(n=isNaN(n)?e:n)&&(t=(t=t.closest(".cart_item"))&&t.querySelector(".remove"))&&(t=JSON.parse(t.getAttribute("data-gtmkit_product_data")),e