Skip to content

Instantly share code, notes, and snippets.

@FactoryAidan
FactoryAidan / AG_MAGE_EE_2.4.0_COMPOSER_v1.patch
Last active June 23, 2023 04:55
Magento 2.4.0 update of `vendor/magento/module-catalog-import-export/Model/Import/Product.php::_prepareRowForDb()` to handle both `array|null` return types from `$this->skuProcessor->getNewSku()`
diff --git a/vendor/magento/module-catalog-import-export/Model/Import/Product.php b/vendor/magento/module-catalog-import-export/Model/Import/Product.php
index 25bbecdce..1c50196a2 100644
--- a/vendor/magento/module-catalog-import-export/Model/Import/Product.php
+++ b/vendor/magento/module-catalog-import-export/Model/Import/Product.php
@@ -1278,8 +1278,11 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
if ($this->isSkuExist($lastSku)) {
$newSku = $this->skuProcessor->getNewSku($lastSku);
- $rowData[self::COL_ATTR_SET] = $newSku['attr_set_code'];
- $rowData[self::COL_TYPE] = $newSku['type_id'];