Ask Sell with WP Today’s question comes from Travis:

Is there a way to create a “Buy X, Get Y” system with WooCommerce? Ideally Product Y would be given to the customer for free automatically (no coupon code needed).


This was one I wasn’t sure about at first 🙂 However, after a bit of digging through the extension marketplace, it looks like the Chained Products extension ($49+) is exactly the right tool to help you gift WooCommerce products to your customers.

This lets you create a system where a customer gets a free product with purchase; this can be a product that’s typically paid for, or a hidden free product you have just for this occasion.

Gift WooCommerce Products: Set up Chained Products

Once you’ve activated and installed the plugin, setting up chained products for WooCommerce is very simple. While editing the product, go to Product Data > Linked Products. This will give you new options to add chained products. You can add 1 or more products with this “main” product.

Gift WooCommerce Products: WooCommerce chained product setup

Now this chained product will be given away for free when your main product is purchased. You can even manage the inventory of this chained product to be sure you don’t run out of free gifts.

The customer will see this chained product in the cart, but cannot adjust its quantity or remove it.

Gift WooCommerce Products: WooCommerce Chained Products cart view

When a main product is removed, the chained product is removed from the cart as well. If the quantity of the main product is adjusted, the chained product will be adjusted too.

Gift WooCommerce Products: cart updates

That’s about it! You can definitely do some more with Chained Products though if you want to expand your usage of free gift WooCommerce products.

Gift WooCommerce Products: Multiple Free Gifts

You can give away more than one chained product with a main product purchase. Click the + button next to the first chained product to add more chained products to the bundle.

Gift WooCommerce Products: multiple gifts

When the product is purchased, all of your selected chained products will be added to the cart. You can adjust the quantities of each as well.

You probably want your customers to know about your free gifts, right? There’s a handy [chained_products] shortcode you can use on your product page to output which products are included in purchase (either in your description or short description).

This purchase includes:
[chained_products]

When this is used, the chained products are output automatically:

Gift WooCommerce Products: chained product output

This shortcode also accepts attributes to modify its display, letting you change things like whether the price should be shown or not.

As a quick alternative, I didn’t want to show this with just one free gift, so I added a WooCommerce notice to my short description instead (you’d need to replace my product name / link with your own):

<div class="woocommerce-info">Special deal! Get <a href="/product/woo-single-1/">Woo Single #1</a> for <strong>free</strong> when you purchase this album!</div>

This showed a notice instead:

Gift WooCommerce Products: chained product notice

Gift WooCommerce Products: Variable Product Support

If you use variable products, you can chain a gift to a specific product variation. When you edit your WooCommerce variations, you’ll manage chained products on a per-variation basis. You can also use the variation description to output chained products.

Gift WooCommerce Products: variation chained products

If a variation does not have a chained product, it will be displayed normally.

Gift WooCommerce Products: no variation chains available

If the variation does have a chained product, this will be available when the variation is purchased.

Gift WooCommerce Products: chained variation display

A chained product for a variation will act the same way in the cart as a simple product’s chained product.

Gift WooCommerce Products with Chained Products

WooCommerce Chained Products provides the perfect solution for automatically gifting WooCommerce products for free to your customers. This is a great way to give out samples, reward customers for purchasing new products, give away Memberships products with a purchase, or put together simple bundles.

The ability to manage inventory while giving away chained products makes it very simple to both sell or give away a free product with purchase without losing track of your stock on hand.

Hope this helps Travis!


Note: This post may contain affiliate links, which means we get a commission from the plugin, theme, or service provider if you choose to purchase. Regardless of this, we are committed to providing high quality, unbiased resources. Have more questions? See our affiliate policy. You can use the plain links below if you prefer that we not receive a referral commission:
Articles you may also like:

Posted by Beka Rice

Beka Rice manages the direction of Sell with WP content and writes or edits most of our articles to share her interests in eCommerce. Or she just writes as an excuse to spend more time jamming out to anything from The Clash to Lady Gaga. Who knows.

One Comment

  1. Great post,

    Do you know if there is a way to limit usage with chained products.
    So lets take Buy X Get Y free.
    Can you limit the usage to a maximum of 10 times (as apposed to infinite times).

    Reply

Leave a reply

Your email address will not be published. Required fields are marked *