0

When upgrading from 2.1 to 2.3.5, I am now getting the following error when I try to create a new cart rule:

[2020-09-19 15:53:49] main.CRITICAL: Notice: Undefined index: rule_id in /var/www/html/magento2/vendor/stripe/module-payments/Observer/CouponEditObserver.php on line 29 {"exception":"[object] (Exception(code: 0): Notice: Undefined index: rule_id in /var/www/html/magento2/vendor/stripe/module-payments/Observer/CouponEditObserver.php on line 29 at /var/www/html/magento2/vendor/magento/framework/App/ErrorHandler.php:61)"} []

I emailed stripe support and they've told me it's not them. Any help would be appreciated. Thank you.

2
  • Same issue with magento 2.4. did you find a solution?
    – Donato P
    Sep 22 '20 at 6:53
  • No sorry, not yet. I'll reply here when I do. Hopefully someone will be able to help.
    – deicul
    Sep 24 '20 at 1:48
2

This error related to Stripe Payment extension, when you upgrade Magento from 2.1 to 2.3.5, you have to change PHP version to 7.2 or 7.3 then the error will be happened. The easy way is change the code around line 29 in vendor/stripe/module-payments/Observer/CouponEditObserver.php

if (!isset($data['rule_id']) || !is_numeric($data['rule_id']))
        return;

instead of

if (!is_numeric($data['rule_id']))
        return;
1
  • Apologies for the late reply. Only just got around to this. Thank you so much! This fixed the issue for me.
    – deicul
    Dec 9 '20 at 4:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.