Apply coupon discount via GET method in URL even if cart is empty in WooCommerce

后端 未结 3 1679
余生分开走
余生分开走 2020-12-31 18:27

I have a plugin that sends an advocates referral coupon code to e-mails that they enter. When the audience receives this email I\'d like to create a flow where they can clic

3条回答
  •  無奈伤痛
    2020-12-31 19:05

    use below code to make the coupan valid in any situation

    add_filter('woocommerce_coupon_is_valid','coupon_always_valid',10,1);
    function coupon_always_valid($valid){
         $valid = true;
         return $valid ; 
    }
    

提交回复
热议问题