

$woocommerce->add_error("Please enter coupon code to checkout.") $my_coupon = $woocommerce->cart->applied_coupons Įcho $woocommerce->cart->get_applied_coupons UPDATED: add_action('woocommerce_check_cart_items', 'make_coupon_code') Simply click the ‘Get OptinMonster Now’ button to get started. First, you need to visit the OptinMonster website to create an account. The merchants website is not True 80 OFF Health Deli Wordpress Coupon Code & Promo where the very best markdowns are located.
#Wordpress coupon code software#
It is the best WordPress popup plugin and lead generation software in the market. After entering a name, click the ‘Start Building’ button. The final step before building your coupon popup is to name the campaign.

Next, hover over the template and click the ‘Use Template’ button. The next step is to create a coupon/discount code that customers can use to get a discount on their purchase.

#Wordpress coupon code how to#
Note: Here I have added required attribute of html. How to Create Your Coupon Popup in WordPress The best way to create a coupon popup is by using OptinMonster. You can use the search box to find the Coupon template or scroll down the page. Step 2: Create a New Coupon/Discount Code. Now its time to modify the code in wp-content > themes > your-theme > woocommerce > checkout > form-coupon.php :įind following code line in above mentioned file : " id="coupon_code" value="" />Īnd replace above line with " id="coupon_code" value="" required/> Wp-content > themes > your-theme > woocommerce > checkout > form-coupon.php. Copy that file and paste it to the directory which we created at top of that answer. When you go in above path, you will find one file named as form-coupon.php. Wp-content > plugins > woocommerce > templates > checkout Now go to your plugin directory and follow below path : Want to create a personal or business website with the lowest expenses Choose the most attractive WordPress coupon code deals and build a professionally. So now it will look something like wp-content > themes > your-theme > woocommerce > checkout. Make one folder in your theme folder woocommerce and in new created woocommerce folder, create another folder with checkout name. I don't know about the function but you can modify the plugin to achieve this in following manner :
