Invalid Coupon error or Load infinitely
-
Hello WebToffee Support Team,
We are using your “Smart Coupons for WooCommerce” plugin on our store. We recently ran into a critical server error (500) that crashes the checkout and cart pages for specific customers when trying to apply a coupon (which auto-generated by SUMO reward plugin when they apply the reward points).
The issue occurs when your plugin’s
maybe_auto_apply_on_wp_loaded()andauto_apply_coupons()functions attempt to process a dynamically generated reward coupon created by the SUMO Reward Points plugin (e.g., a coupon with the prefixsumo_). Instead of bypassing the unrecognized formatting, the scan throws an “Invalid coupon” exception and crashes the site with a fatal PHP error.Here is the error log trace:
2026-03-24T10:46:38+00:00 Critical Uncaught Exception: Invalid coupon. in /.../wp-content/plugins/woocommerce/includes/data-stores/class-wc-coupon-data-store-cpt.php:118Stack trace highlights:#3 /.../plugins/wt-smart-coupons-for-woocommerce/.../class-wt-smart-coupon-auto-coupon-public.php(181): WC_Coupon->__construct()#5 /.../plugins/wt-smart-coupons-for-woocommerce/.../class-wt-smart-coupon-auto-coupon-public.php(731): Wt_Smart_Coupon_Auto_Coupon_Public->auto_apply_coupons()Full error code: https://pastecode.io/s/46nj7gzf
Could you advise how to fix the error?
Thank you!
You must be logged in to reply to this topic.