Woocommerce - Is it possible to add variable products to a grouped product? Woocommerce - Is it possible to add variable products to a grouped product? wordpress wordpress

Woocommerce - Is it possible to add variable products to a grouped product?


It is possible to do this with grouped products in Woocommerce 3.0+, but does require editing one line in a core Woocommerce file. It's super easy once you know what to change, and it's never recommended to change core files, but perhaps this can help you figure out how it works, then come up with a better solution.

The file is located here: /wp-content/plugins/woocommerce/includes/admin/meta-boxes/views/html-product-data-linked-products.php

Change line 15 (HTML <select> tag)

FROM: data-action="woocommerce_json_search_products"

TO: data-action="woocommerce_json_search_products_and_variations"

Yes, it really is that simple. This will allow the Select2/SelectWoo search box to pull in both parent products and individual variations.

Keep in mind, any future Woocommerce update will override this change. So you will need to override the file permanently, or track it in Git to highlight changes to the file, etc.


The WPC Grouped Product plugin looks like it does what you want. Essentially it is an upgrade to the default Woo "grouped products" so that you can include a variable product and/or a specific variation of a product. And it's free! https://wordpress.org/plugins/wpc-grouped-product/