kathyisawesome / wc-not-sold-separately

Restrict WooCommerce products from being sold outside a Mix and Match product
GNU General Public License v3.0
2 stars 0 forks source link
hacktoberfest mix-and-match woocommer

Not Sold Separately for WooCommerce

Limit WooCommerce products to being sold only as part of a Mix and Match product.

Quickstart

This is a developmental repo. Clone this repo and run npm install && npm run build
or
Download latest release

Usage

  1. Edit a simple product and navigate to the "Inventory" tab in the product data metabox.

product data metabox showing "not sold separately" checkbox in Inventory tab

  1. For an individual variation, you can set the status in the variation options. variation panel showing "not sold separately" checkbox

  2. Save the product/variation.

When visiting the single product page, the add to cart button should now be gone:

single product page for Woo Ninja product with no add to cart button

And that particular variation should not be visible when visiting a variable product page.

However, the product can still be purchased as part of a container:

The Woo Ninja product appears in cart as part of T-Shirt 6 Pack

Compatibility Requirements

Mix and Match 2.0.0

Automatic plugin updates

Plugin updates can be enabled by installing the Git Updater plugin.

Important

  1. This is proof of concept and does not receieve priority support.
  2. At this time, only Mix and Match containers are supported.