Skip to content

Commit 27bd8f3

Browse files
committed
Fix typo of wrong setting of $product as category
1 parent 65a7463 commit 27bd8f3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

DataLayer/Tag/Category/Products.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Yireo\GoogleTagManager2\DataLayer\Tag\Category;
44

5+
use Magento\Catalog\Api\Data\ProductInterface;
6+
use Magento\Catalog\Model\Product;
57
use Magento\Framework\Exception\NoSuchEntityException;
68
use Magento\Catalog\Model\Category;
79
use Yireo\GoogleTagManager2\Config\Config;
@@ -53,7 +55,8 @@ public function get(): array
5355
break;
5456
}
5557

56-
$product->setCategory($product);
58+
/** @var Product $product */
59+
$product->setCategory($category);
5760
$productData = $this->productDataMapper->mapByProduct($product);
5861
$productData['quantity'] = 1;
5962
$productData['index'] = $i;

0 commit comments

Comments
 (0)