Questions tagged [coupon]

For questions related to performing discounts on eCommerce transactions. (Please do not use this tag for questions regarding financial calculations regarding bond coupons and interest rates.)

This tag refers to performing discounts on eCommerce transactions (i.e. taking coupons in the applications OpenCart, Magneto, or WooCommerce applications.) Besides the logic to implement the discounts, this tag could also refer to generation of unique or batch coupon codes.

For financial calculations regarding bond coupons and interest rates, please use a different suitable tag, such as:

499 questions
2
votes
1 answer

Auto apply coupon only one time per user based on total spent in WooCommerce

I would like to apply a coupon automatically based on customer total spent amount. This coupon needs to be applied only one time by customer. This is what I've tried so far but I'm getting a blank screen: add_action(…
2
votes
1 answer

Woocommerce: do not apply coupon to backorder items

I need to remove coupon discount for backordered (and out of stock) items in cart, but without removing that discount for other eligible items. E.g. 2 items in cart, Item1 is in stock and gets coupon discount 20%, Item2 is out of stock, backorders…
Demuri Celidze
  • 579
  • 2
  • 7
  • 25
2
votes
1 answer

Limit the number of applied coupons at checkout in Woocommerce

In Woocommerce, I would like to limit the number of coupons allowed at checkout so customer can only use 2 coupons in total, but no more. I plan to have the coupons usable in conjunction so they can combine any 2 but I do not want them to be able…
user3183430
  • 21
  • 1
  • 5
2
votes
2 answers

Exclude variations with 2 specific attribute terms from coupon usage in Woocommerce

I need to prevent coupons being used if customer have any specific product variations in their cart with following attribute terms: attribute_pa_style => swirly attribute_pa_style => circle I've looked through the Woocommerce scripts that apply to…
2
votes
1 answer

Limit to one applied coupon, removing other previous applied coupons in Woocommerce

I am making coupon dynamically to use user email as coupon but how can I restrict user to use only one coupon per cart. If use multiple auto removed the previous one from cart. add_filter ( 'woocommerce_get_shop_coupon_data', 'generate_coupons',…
Firefog
  • 3,094
  • 7
  • 48
  • 86
2
votes
2 answers

Applied coupons disable Free shipping conditionally in Woocommerce

I am trying to get it so that if a customer were to add a coupon code (Any of them) the Free Shipping option would go away and the flat rate fee would be implemented. - You would think this would be an easy thing to implement, there would be 100's…
KangOnRails
  • 143
  • 1
  • 11
2
votes
2 answers

Remove some payment gateways if any coupon code is applied in Woocommerce

I started to work on small Woocommerce project. I have 3 payment gateways into this store: Paypal, Credit Card and Direct bank Transfer. What I would like is: If coupon code is used, I would like to disable (or remove) Paypal and Credit Card from…
Doroti Henridgz
  • 105
  • 3
  • 13
2
votes
1 answer

Cart item discount based on specific product variation in Woocommerce

I’ve, on my DIY sell store, a product named ‘Reusable wet’ which come in different patterns and different packages. 5 Reusable wet cost €10 10 Reusable wet cost €18 Since they are a lot of different patterns, the customer could want 10 wet, but…
LoïcR
  • 4,940
  • 1
  • 34
  • 50
2
votes
2 answers

Make coupon field mandatory for a product category in WooCommerce

I am trying to make it so the coupon field is mandatory on Woocommerce for a product category. I have tried to use the code from this answer but it only works with a set of coupon code. I need it to work with any valid coupon code. Thank you for any…
Xander
  • 23
  • 3
2
votes
1 answer

Progressive fixed Coupon Discount based on specific product quantity in Woocommerce

I have one little problem that dont know how to fix myself. I want to use this logic into my Woocommerce store just for one product. I have use link like this to autmatically apply coupon code and add to…
2
votes
1 answer

Auto apply or remove a coupon in Woocommerce cart for a specific product id

I am applying automatically a coupon when there is a product id 1362 in the cart, but when someone adds another product and delete the 1362 the coupon stays applied, how to prevent this by removing the coupon if there is no 1362 product id in the…
Playzare
  • 93
  • 3
  • 13
2
votes
1 answer

Auto apply coupon based on custom user_meta in Woocommerce

First post here so be gentle. I have done my usual searching and testing but I am stumped. Anyways here is my code that I am trying to use. I need to apply a coupon code that takes 2% off all orders if the user belongs to a certain buying group…
Michael J
  • 23
  • 2
2
votes
2 answers

Coupon with 2 different percentage discounts based on product category in Woocommerce

I am looking for a Woocommerce hook that will help to change the discount percentage based on 2 different product category restrictions when a specific coupon is applied. For example if customer add a specific coupon I will like to: If a cart item…
Manik
  • 513
  • 1
  • 7
  • 23
2
votes
1 answer

Unlink coupon form on Woocommerce checkout page

Which file do I need to edit if I don’t want user to click the link to apply the coupon code? In simple, I want no LINK to be clicked on. I want the apply coupon appear below the text "Have a coupon?" so that user can ALWAYS see the section.
nani.nsr
  • 23
  • 5
2
votes
2 answers

Auto apply a percentage or fixed cart discount based on the total in WooCommerce

I'm trying to set up a coupon on my client's WooCommerce site so that a percentage discount applies if the total cart is below a cap amount or a fixed amount is equal or greater than the cap amount. Let's say that the cap for the cart total is 200.…
Jun Dolor
  • 609
  • 2
  • 11
  • 25