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

WP SITES

2784

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Shop
  • Checkout
  • Cart

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

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Account
  • Checkout
  • Cart
 

Loading Comments...
 

You must be logged in to post a comment.