• Resolved ibanezrg770

    (@ibanezrg770)


    Hi,
    I would like to change the display of one coupon in the cart based on coupon code. For instnace:
    Coupon: coupon_1
    Coupon: coupon_2
    Coupon Applied <—— changes the display
    Coupon: coupon_4

    I have tried

    add_filter('woocommerce_cart_totals_coupon_label', 'hide_coupon_code', 99, 2 );
    function _hide_coupon_code($label, $coupon) {
    	   Return 'Discount applied';
    }

    But this changes all the coupons. Is there a way to change only one coupon based on coupon code? Thanks all!

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change the display on only one coupon in the cart’ is closed to new replies.