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
1
vote
0 answers

Woocommerce Coupon Allowed emails restrictions not working

I create New coupon code with Allowed emails restrictions in Woocommerce. But Guest Users(Guest User Emails Not Registered Allowed emails Fields) get Discounts using this coupons.
Karthik
  • 5,589
  • 18
  • 46
  • 78
1
vote
0 answers

How to add an existing coupon to a Woocommerce Subscription?

My users can request a discount (or cancel their subscription) on their renewal order through a form. Using the form submission hook I created a function that if the action is === "cancel" it cancels the subscription, but if the action is ===…
1
vote
1 answer

Display custom text on WooCommerce Order Received page if specific coupons are used

I'm attempting to display a custom thank you message on the Woocommerce order received page if one of three specific coupon codes are used during checkout. Our Woocommerce version is 2.6.11. I've tried a few variations of the below code but cannot…
Connor
  • 23
  • 3
1
vote
1 answer

Auto populate excluded products in WooCommerce coupons

I am looking for a way to not have to manually exclude products from coupons based upon the product ID that the coupon should apply to. Thus, build an array of all product IDs in the shop that will then populate the excluded products field minus the…
per4manz
  • 11
  • 1
1
vote
0 answers

Maximum coupon Discount in WooCommerce

Based on "Fix maximum coupon Discount On Cart percentage in WooCommerce" answer thread, I use the following code in my active theme's function.php file: add_action('woocommerce_coupon_options_usage_limit', 'woocommerce_coupon_options_usage_limit',…
arsalan
  • 11
  • 2
1
vote
0 answers

Force a shipping method when a valid coupon is applied in Woocommerce

Using Woocommerce, I want to force a shipping method when a certain valid coupon is applied at the cart/checkout phase. Below my code. It extends WC_Shipping_Method, gets the whole woocommerce coupon list, let admin to select one or more, save them…
1
vote
0 answers

Shipping rate applied only if a certain coupon is used in WooCommerce

I need to create 2000 coupons to sell, but I would like the customers who will use them to always pay for shipping. Currently the threshold for getting free shipping is set above 69€. I tried to use the code below (taken from here: Applied coupons…
1
vote
1 answer

Remove specific states if any coupon is applied in Woocommerce

I'm have been searching for solution for this in google but I have not found any. Is there a way to hide some state if a coupon its active? I found "Remove specific states of a country on Woocommerce Checkout" answer code that works with payment…
1
vote
1 answer

Auto apply a coupon for a specific product based on Woocommerce cart subtotal

Referring to this question: Apply a coupon programmatically in Woocommerce and then this one:How to apply an automatic discount in WooCommerce based on cart total? Complete rookie here. I need to auto-apply an already existing coupon to one…
1
vote
1 answer

Apply coupon automatically for one shipping method in Woocommerce

On Woocommerce, I am trying to apply a coupon based on a specific shipping method. There is two shipping method set: Free Shipping (3 Days): £0.00 DPD Next Day: £4.00 If the customer selects DPD Next Day: £4.00 shipping method, a specific coupon…
developerme
  • 1,845
  • 2
  • 15
  • 34
1
vote
1 answer

Display a coupon code on single product pages in Woocommerce

I want to display discount coupon on every product page on woocommerce for two reasons. A lot of new customers overlooks discount coupons mentioned on home page and header of website despite my best intention. With discount coupons I want to…
Mayank Gupta
  • 93
  • 1
  • 5
  • 11
1
vote
0 answers

Woocommerce Coupon to Waive Custom Fee

I have the following code that adds a Handling fee to orders with subtotal under $100. I'm trying to make a coupon that will remove the handling fee (or make it $0) that I can give to specific customers, even if their order is under $100. I've made…
Coracle
  • 31
  • 1
  • 3
1
vote
1 answer

Setting a tax class based on specific coupon in Woocommerce

This has been answered a while back but the filter is not working anymore. Not sure if it is deprecated or not. I am using both filters: woocommerce_product_tax_class woocommerce_product_get_tax_class My function looks like: function…
Tyler Nichol
  • 635
  • 2
  • 7
  • 28
1
vote
1 answer

Updating Woocommerce Coupon descriptions mysql

in my database this gives me the correct coupon results im looking for SELECT p.`ID`, p.`post_title`, p.`post_excerpt` FROM `wp_posts` AS p INNER JOIN `wp_postmeta` AS pm ON p.`ID` = pm.`post_id` WHERE p.`post_type` = 'shop_coupon' AND…
Brad Holmes
  • 497
  • 5
  • 22
1
vote
1 answer

Apply automatically a coupon based on specific cart items count in Woocommerce

I am trying to automatically trigger a coupon to be applied in the cart specifically for when there are 4 items in the cart. The coupon is pre-created in the Woocommerce back-end of the site "tasterbox" I am using an amended version from this…
Giuls
  • 570
  • 11
  • 33