Support » Plugin: Smart Coupons for WooCommerce » coupons do not apply automatically either in cart or at checkout

Viewing 1 replies (of 1 total)
  • Plugin Author webtoffee

    (@webtoffee)

    Hi @dubok,

    Sorry for the inconvenience. If you have too many coupons in your store with automatic apply enabled, this could happen.

    One major factor to be taken into account while configuring huge amount of auto apply coupon in your store is the server capacity. When a considerable amount of coupons are configured for auto apply feature, the plugin will check for the eligibility of all these coupon whenever a customer moves his products into the cart. This may result in high memory usage and thereby slowing down of your site. However, the plugin has effectively dealt with this case by considering only the latest 5 (recently published) for applying automatically.

    Now that, if your server is fully equipped to handle any number of coupons or if you feel like instead of 5, you need to set at least 10 coupons for auto apply, then just simply use the below given filter in the active child theme’s functions.php.

    add_filter( 'wt_smartcoupon_max_auto_coupons_limit', function( ) { return 10; } );

    The above filter will allow you to have a maximum of 10 coupons (recently published) for auto-apply option. Replace the number 10 from the code and insert the required number to have as many auto-apply coupons for your store. The plugin restricts the coupons from applying automatically to a maximum count of five only to facilitate uninterrupted workflow for your store. By asserting this restriction, the slowness caused due to unnecessary memory usage for verifying the coupon eligibility can be reduced considerably.

Viewing 1 replies (of 1 total)
  • The topic ‘coupons do not apply automatically either in cart or at checkout’ is closed to new replies.