We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unfortunately, Magento has changed the signature of applyRules() between 2.4.3 and 2.4.4 which breaks your plugin:
2.4.3 https://github.com/magento/magento2/blob/4c36116dcf878e127059d9be9566a119783583f2/app/code/Magento/SalesRule/Model/RulesApplier.php#L96-L106
2.4.4 https://github.com/magento/magento2/blob/0f9a056c8d83c4f319626b3e56ec52a533999f25/app/code/Magento/SalesRule/Model/RulesApplier.php#L99-L109
$rules is now a simple array and not a Magento\SalesRule\Model\ResourceModel\Rule\Collection anymore.
$rules
array
Magento\SalesRule\Model\ResourceModel\Rule\Collection
The text was updated successfully, but these errors were encountered:
Any update on this issue? We have too in 2.4.6...
Sorry, something went wrong.
Having the exact same issue after update.
just remove array before $rules like this :
public function aroundApplyRules( RulesApplierModel $subject, Closure $proceed, AbstractItem $item, $rules, bool $skipValidation, $couponCode ) { if ($this->backendSession->getIsFromlengow()) { $rules = $this->ruleFactory->create()->addFieldToFilter('rule_id', ['eq' => 0]); } return $proceed($item, $rules, $skipValidation, $couponCode); }
No branches or pull requests
Unfortunately, Magento has changed the signature of applyRules() between 2.4.3 and 2.4.4 which breaks your plugin:
2.4.3
https://github.com/magento/magento2/blob/4c36116dcf878e127059d9be9566a119783583f2/app/code/Magento/SalesRule/Model/RulesApplier.php#L96-L106
2.4.4
https://github.com/magento/magento2/blob/0f9a056c8d83c4f319626b3e56ec52a533999f25/app/code/Magento/SalesRule/Model/RulesApplier.php#L99-L109
$rules
is now a simplearray
and not aMagento\SalesRule\Model\ResourceModel\Rule\Collection
anymore.The text was updated successfully, but these errors were encountered: