Skip to content

Commit c8b31ca

Browse files
committed
Merge branch 'main' into 1.3.0
2 parents a37898a + 535a2b5 commit c8b31ca

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

app/code/Meta/Catalog/Model/CatalogUpdateHandler.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,14 @@ private function processDeletes(Collection $productUpdates, string $catalogId)
248248
{
249249
$requestData = [];
250250
foreach ($productUpdates as $productUpdate) {
251-
$identifier = $this->productIdentifier->getMagentoProductRetailerId($productUpdate);
251+
// Can not use productIdentifier->getMagentoProductRetailerId(),
252+
// since it does not take FacebookCatalogUpdate Object
253+
if ($this->productIdentifier->getProductIdentifierColName() === 'sku') {
254+
$identifier = $productUpdate->getSku();
255+
} else {
256+
$identifier = $productUpdate->getProductId();
257+
}
258+
252259
if ($identifier) {
253260
$requestData[] = $this->batchApi->buildDeleteProductRequest($identifier);
254261
}

0 commit comments

Comments
 (0)