Skip to content

Commit 6188490

Browse files
zliksol-loup
authored andcommitted
Always return product as content_type for InitiateCheckout event (both CAPI and Pixel) (#728)
1 parent d3cdcb3 commit 6188490

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

app/code/Meta/Conversion/Block/Pixel/InitiateCheckout.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,6 @@ public function getContentCategory(): string
194194
*/
195195
public function getContentTypeQuote(): string
196196
{
197-
$items = $this->getQuote()->getAllVisibleItems();
198-
foreach ($items as $item) {
199-
$product = $item->getProduct();
200-
}
201-
return $this->magentoDataHelper->getContentType($product);/** @phpstan-ignore-line */
197+
return 'product';
202198
}
203199
}

app/code/Meta/Conversion/Model/Tracker/InitiateCheckout.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,7 @@ private function getContentTypeByQuote(CartInterface $quote): string
138138
return '';
139139
}
140140

141-
$items = $quote->getAllVisibleItems();
142-
foreach ($items as $item) {
143-
$product = $item->getProduct();
144-
}
145-
return $this->magentoDataHelper->getContentType($product); /** @phpstan-ignore-line */
141+
return 'product';
146142
}
147143

148144
/**

0 commit comments

Comments
 (0)