• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2787

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Checkout
  • Cart
  • Videos

Only Allow 1 Coupon Code On Cart & Checkout WooCommerce

$75.00

Demo Video
Category: WooCommerce Tags: get_applied_coupons, woocommerce_coupons_enabled
  • Description

This PHP code enables you to programmatically remove the coupon code field once the first coupon code is entered & applied. Customers cannot enter another coupon as the coupon box is removed at the same time as the 1st coupon is applied as seen in the demo video.

Note : You can use the WooCommerce Marketing > Coupons > Coupon Data > Usage Restriction > Individual use only setting to do the same thing however this code enables you to integrate usage with WooCommerce extensions and other conditions using PHP.

Installation

There’s only 1 step :

Copy & paste the PHP code to the end of your child themes functions file or custom functionality plugin.

Primary Sidebar

Cart

Code written by Brad Dalton specialist for WooCommerce with more than 10 years of experience.

Advertise · WPEngine · Genesis · Log in

  • Code Snippets
  • Tutorials
  • Videos
  • Account
  • Checkout
  • Cart
 

Loading Comments...
 

You must be logged in to post a comment.