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
1 answer

Adding custom coupon settings enabling an auto apply feature in WooCommerce

I would like to add 2 checkboxes to the WooCommerce coupon settings. The first checkbox, when checked, will automatically apply the coupon to products (the product setting is configured on the general coupon tab). The second checkbox, when checked,…
Mohsen
  • 300
  • 2
  • 13
1
vote
1 answer

Add a 2nd column with custom metadata in WooCommerce Admin Orders

I have a custom column in WooCommerce showing coupons used (see screenshot) added via a code snippet. I'd like to add another that shows store credit used in $ amount on each order, I'm using Advanced coupons, and they've told me that orders with…
1
vote
1 answer

Remove free product if specific coupon is applied to cart in WooCommerce

For WooCommerce, I try to use the following 2 code snippets: The first one adds a "winter" product at 0 cost if the cart reaches €40. This works. Then I have the second code snippet that if I add a "summer" coupon it should remove the "winter"…
1
vote
0 answers

Add Included Products restriction to WooCommerce admin coupons list

Add a column of the 'Usage restrictions > Products' field on the admin coupon list in WooCommerce. How can I show the products that are attached to the coupons in the 'Usage restrictions > Products' field on the admin coupon list in WooCommerce?
Joshua
  • 11
  • 2
1
vote
0 answers

How to limit quantities of discount coupon usage times in laravel

e.g .. i create a new coupon that can be use 50 times. After used 50 times, it will be expired or cannot use anymore. coupon quantities will decrease with each use .
yan naing
  • 37
  • 1
  • 6
1
vote
1 answer

WooCommerce coupons - how to apply percentage coupon THEN store credit

Currently, using the WooCommerce Smart Coupons plugin, when combining two different coupons, a store credit is used first and then a percentage is used on the total after the first coupon is used. This is illogical when you give someone store credit…
jmsheldon
  • 13
  • 3
1
vote
1 answer

How to change apply button text in check out page in WooCommerce

I'm working on an ecommerce website and I need your help. I was trying to modify the Text "Apply" in the Apply Coupon button in the Checkout page for a long time, and nothing achieved the goal. since I need to replace Apply Coupon with Arabic…
Rama Absa
  • 99
  • 11
1
vote
1 answer

Disable "cart needs payment" for a list of coupon codes in WooCommerce

I would like to disable 'cart needs payment' for a list of discount codes: coupon1, coupon2, coupon3, etc.. I have found this code by @LoicTheAztec, and it works fine, but only for a specific discount code: add_filter(…
Sergixel
  • 35
  • 4
1
vote
1 answer

Stripe - Is it possible to retrieving promotion code from payment_intent.succeeded?

So I'm trying to implement promotion codes in my Stripe Checkout. I got everything working just fine, the only thing I'm missing is the ability to see which promotion-code was used in the payment_intent.succeeded object. I can't find it in the…
1
vote
1 answer

How to automatically find web services exposed on web about a special topic

How to find the available online web services for specific offers and coupons. I am charged to develop a webapp using spring boot, that well look on the web for available offers about a topic with some cretiria and consume these services. Is there a…
Elmo Pro
  • 27
  • 5
1
vote
1 answer

Programmatically apply a coupon in WooCommerce 3.0+ for first order made by a customer

I use this code to programmatically apply a coupon in WooCommerce, for first order made by customers. I am needing a function that sees if the customer is new, and if so applies the coupon code. I am trying to use this within my functions.php of my…
1
vote
0 answers

Issue changing WooCommerce coupon label on mobile

I am trying to change the coupon name/label in the WooCommerce cart and checkout tables with: add_filter( 'woocommerce_cart_totals_coupon_label', 'custom_woocommerce_cart_totals_coupon_label', 10, 2 ); function…
rogerk
  • 43
  • 5
1
vote
1 answer

Stripe: Can I create a single "1 month free" promo code for multiple products?

I've been reading though the Stripe documentation but can't figure out if it's possible to have a single promotion code for multiple products, to give a 1-month discount, for products which have both monthly and yearly pricing. Our product setup is…
rangfu
  • 6,878
  • 2
  • 16
  • 17
1
vote
2 answers

Store when a coupon last time was used in WooCommerce

I need to record the date of the last time each coupon was used in WooCommerce. I have seen that the post_meta table saves a used_by record with the emails of the clients who used it, but there is no date record. Looking for filters I think this one…
1
vote
1 answer

Change product sale price to regular price in WooCommerce cart when a coupon is applied, but exclude certain categories

When a coupon is applied (belonging to a certain type) I change the product discount price to the regular price via: add_action( 'woocommerce_before_calculate_totals', 'add_custom_price', 10, 1); function add_custom_price( $cart_object) { …
Giacomo
  • 341
  • 2
  • 8
  • 25