From 811385fb4e70894829449fd8ee1a1ec786617db3 Mon Sep 17 00:00:00 2001 From: Torben Lundsgaard Date: Sun, 10 Dec 2023 18:48:11 +0100 Subject: [PATCH] Bugfix: make sure that index is always defined --- src/Integration/WooCommerce.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Integration/WooCommerce.php b/src/Integration/WooCommerce.php index 465ddff..c8f2de3 100644 --- a/src/Integration/WooCommerce.php +++ b/src/Integration/WooCommerce.php @@ -863,7 +863,7 @@ public function product_list_loop_add_to_cart_tracking(): void { $this->get_item_data_tag( $product, $list_name, - $woocommerce_loop['loop'] + ( $woocommerce_loop['loop'] ) ?? 0 ), [ 'span' => [