Skip to content
Advertisement

WooCommerce discount: buy one get one 50% off

I wish to set up a specific discount on a particular variable products, if customer buys one product they get the another(same) on 50% discount(Buy one get another for 50% off). I’ve tried many discount plugins buy the closest that I have found are:

  • Pricing Deals for WooCommerce

  • WooCommerce All Discounts Lite

  • WooCommerce Extended Coupon Features

By using these plugins I was able to setup discount on subtotal or discount on a each product but not exactly what I am looking for(Buy 1 get 1 off). There are other pro plugins I don’t want to go for it.

Is it possible to achieve without purchasing a plugin?

Thanks

Found something similar https://www.fldtrace.com/buy-3-get-1-free-coupon-woocommerce

Advertisement

Answer

Update (related to your comments)

This version will work globally on all product variations in the cart for this defined variable product:

JavaScript

Code goes in function.php file of your active child theme (or theme) or also in any plugin file.

This code is tested on Woocommerce 3+ and works.


Original answer:

There is many ways to do add a custom discount of 50% on the 2nd item for a specific variable product ID. Below I am using add_fee() method with a negative value (so it adds a discount).
Optionally it will display a custom notice:

JavaScript

Code goes in function.php file of your active child theme (or theme) or also in any plugin file.

This code is tested on Woocommerce 3+ and works.

Related: WooCommerce discount: buy one get one 50% off with a notice

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement