Contributors: robindarlington

Donate link: https://lancerun.site/contact/paiement/

Tags: ecommerce, woocommerce, discounts, promotions, buy x get x free

Requires at least: 4.0

Tested up to: 5.9

Stable tag: 1.0.0

License: GPLv2 or later

License URI: http://www.gnu.org/licenses/gpl-2.0.html

Description

The Buy X Get X Free plugin allows you to offer buy X get X free promotions on your WooCommerce store. With this plugin, you can create special discounts where customers receive a certain number of items for free when they purchase a specified quantity of items.

Key Features:

  • Offer buy X get X free promotions on your WooCommerce store.
  • Set up a promotion for specific product categories.
  • Customize the number of items customers need to buy to qualify, and the number of identical they can get free if they reach that threshold.
  • Works seamlessly with the WooCommerce cart and checkout process.
  • Simple and intuitive setup process.

Installation

  1. Upload the bxgxf folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Configure the plugin settings under the ‘Buy X Get X Free’ section in the WooCommerce settings.

Usage

  1. Navigate to the WooCommerce settings in your WordPress dashboard.
  2. Go to the ‘Buy X Get X Free’ section.
  3. Create a new promotion by specifying product categories it should apply to, the quantity of items to buy, and the quantity of free items to give.
  4. Save your changes and test the promotion on your store.

How it Works

The plugin is simple, it uses your settings to adjust the pricing of products in the cart using the woocommerce_before_calculate_totals hook provided by WooCommerce.

I do not believe it is good user experience to change the contents of a customer’s cart programmatically. Therefore, if the user qualifies for free items currently not in their cart, they are notified and invited to add these via a WooCommerce Notice.

Developers: prices are adjusted in the cart using the woocommerce_before_calculate_totals hook, with a priority of 999999 for maximum compatibility with other price-related WooCommerce plugins.

Frequently Asked Questions

  • Q: How do I set up a buy X get X free promotion?
    To set up a buy X get X free promotion, navigate to the WooCommerce settings in your WordPress dashboard and go to the ‘Buy X Get X Free’ section. Create a new promotion by specifying the product or product category, the quantity of items to buy, and the quantity of free items to give.
  • Q: Can I apply the promotion to specific products or categories?
    At present this plugin allows you to specify a single Buy X Get X free rule, and to assign it to as many categories as you want. In the future, if there is demand, I may develop this plugin further to allow more use cases, such as allowing multiple rules, or assigning rules to individual products, etc. If you’d be interested in such functionality, please send me a message and let me know.
  • Q: How do customers redeem the free items?
    Customers will automatically be notified on the cart page when they meet the requirements of the promotion. To receive the free items they are invited to adjust the quantity of relevant product in their cart. The prices are then adjusted accordingly.

Screenshots

  1. Settings page screenshot.
  2. Customer notification in cart.

Changelog

1.0.0
– Initial release.

Upgrade Notice

1.0.0
Initial release of the Buy X Get X Free