Closed sm9 closed 6 months ago
Hi Stephen,
The documentation looks wrong, sorry. The event no longer has a metafields
array property, you would need to look at the elements meta fields.
Like this:
$metaFields = $event->element->getMetaFields();
We will fix the documentation. Hope that helps.
Description
Hi there, we're trying to follow the guide in the readme here, so that we can only import certain products based on a custom meta data field. Perhaps we've misunderstood how this works, but we tried to change the conditional from:
if ($event->metafields['do_not_sync'] ?? false) {
to
if ($event->metafields['custom.sync_to_craft']) {
But we're seeing this error:
Do you have any ideas where we might be going wrong, or have we hit a bug?
Thanks in advance for any help or advice!
Stephen
Additional info