Skip to content

Commit

Permalink
delete the product #1945 for magento 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzaloebiz committed Apr 8, 2024
1 parent f1d8d2e commit 5d6fbcf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Model/Api/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,16 @@ protected function processDeletedProducts($magentoStoreId, $mailchimpStoreId)
} else {
$this->_helper->modifyCounter(\Ebizmarts\MailChimp\Helper\Data::PRO_DELETED);
$data = [];
$data['method'] = "PATCH";
$data['method'] = "DELETE";
$data['path'] = "/ecommerce/stores/$mailchimpStoreId/products/$productId/variants/$productId";
$data['operation_id'] = $this->_batchId . '_' . $productId;
$data['body'] = $body;
$deletedData [] = $data;
$data['method'] = "DELETE";
$data['path'] = "/ecommerce/stores/$mailchimpStoreId/products/$productId";
$data['operation_id'] = $this->_batchId . '_' . $productId;
$data['body'] = $body;
$deletedData [] = $data;
$this->_updateProduct($mailchimpStoreId, $productId,null, null, null, true);
}
}
Expand Down

0 comments on commit 5d6fbcf

Please sign in to comment.