PHP fatal error in cron Magento\Newsletter\Model\Subscriber\Interceptor::loadByCustomer(), 1 passed in vendor/mailchimp/mc-magento2/Cron/Webhook.php on line 287 and exactly 2 expected
Closed this issue · 0 comments
unifiedarts commented
1. Magento 2.4.6-p2
2. PHP 8.1
3. Mailchimp version 103.4.56
Steps to reproduce
Error in cron_schedule
table:
Error when running a cron job: Too few arguments to function Magento\Newsletter\Model\Subscriber\Interceptor::loadByCustomer(), 1 passed in vendor/mailchimp/mc-magento2/Cron/Webhook.php on line 287 and exactly 2 expected
In vendor/mailchimp/mc-magento2/Cron/Webhook.php
there is this:
$subscriber->loadByCustomer($customer->getId());
and this
$subscriber->loadBySubscriberEmail($customer->getEmail(), $customer->getStoreId());
Both methods calls need as second parameter the websiteId which is required.
Probabbly this: $customer->getWebsiteId()
Actual and Expected result
PHP fatal error