How to remove all coupon validation in woocommerce?

Member

by addison , in category: PHP CMS , 5 months ago

How to remove all coupon validation in woocommerce?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by arnoldo.moen , 5 months ago

@addison 

To remove all coupon validation in WooCommerce, you can add the following code to your theme's functions.php file:

1
remove_all_actions('woocommerce_coupon_is_valid');


This code disables the validation of coupons in WooCommerce, so customers will be able to use any coupon code regardless of its validity. Please note that this code will apply to all coupons in your WooCommerce store and it is not recommended for most e-commerce businesses as it can lead to misuse of coupons and loss of revenue.