ethercreative / mailchimp-commerce

Mailchimp integration with Craft Commerce
Other
5 stars 11 forks source link

Error syncing products that use an Image transformation #26

Closed peteeveleigh closed 4 years ago

peteeveleigh commented 4 years ago

When trying to sync products that have an image transformation (even if you then remove the field mapping for the transform) a PHP error prevents the sync.

array_values() expects parameter 1 to be array, object given

The problem lies in line 449 of ProductsService.php. Which is

$transform = Craft::$app->getAssetTransforms()->getTransformByUid($transform);

For the moment I have worked around it by hardcoding a transform array into the plugin (as per the default you already have in there.