Skip to content

Commit

Permalink
Always return product as content_type for InitiateCheckout event (bot…
Browse files Browse the repository at this point in the history
…h CAPI and Pixel) (#728)
  • Loading branch information
zlik authored and sol-loup committed May 8, 2024
1 parent d3cdcb3 commit 6188490
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions app/code/Meta/Conversion/Block/Pixel/InitiateCheckout.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,6 @@ public function getContentCategory(): string
*/
public function getContentTypeQuote(): string
{
$items = $this->getQuote()->getAllVisibleItems();
foreach ($items as $item) {
$product = $item->getProduct();
}
return $this->magentoDataHelper->getContentType($product);/** @phpstan-ignore-line */
return 'product';
}
}
6 changes: 1 addition & 5 deletions app/code/Meta/Conversion/Model/Tracker/InitiateCheckout.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,7 @@ private function getContentTypeByQuote(CartInterface $quote): string
return '';
}

$items = $quote->getAllVisibleItems();
foreach ($items as $item) {
$product = $item->getProduct();
}
return $this->magentoDataHelper->getContentType($product); /** @phpstan-ignore-line */
return 'product';
}

/**
Expand Down

0 comments on commit 6188490

Please sign in to comment.