Use these snippets to customize the appearance and functionality of WooCommerce Product Bundles.
To use a snippet, download the linked file and activate it as you would with any other plugin. Alternatively, copy the contained code into your child theme’s functions.php file.
Note: We are unable to provide support for customizations under our Support Policy. If you need to customize a snippet, or extend its functionality, seek assistance from a qualified WordPress/WooCommerce Developer. We highly recommend Codeable, or a Certified WooExpert.
By default, optional bundled item checkboxes are unticked by default. This can be changed with the following snippet:
To add an “- optional” suffix next to the title of bundled items that have been marked as optional, use the following snippet/plugin:
By default, a bundled item discount can co-exist with a sale price, reducing the final price of a bundled product even further.
Alternatively, you may prefer to ignore sale prices and apply bundled product discounts over the regular prices of bundled products. This is possible with the following snippet:
Ensure that you are using the latest version of Product Bundles, then use the following snippet/plugin:
The following snippet demonstrates how to adjust the number of bundled item columns to 4:
When the Grouped selection is active under Item Grouping, the subtotals of parent/child line items in cart/order templates are added together and the actual subtotal of the parent item is replaced by the aggregated subtotal. Additionally, the subtotals of individually-priced items are indented and displayed with a Subtotal: prefix.
To prevent this, use the following snippet/plugin:
By default, the stock of a Product Bundle is calculated based on the remaining stock of the bundled items.
To calculate the stock of the bundle based on the stock of parent item instead, which is defined under Product Data > Inventory, use the following snippet:
Hide the short description that shows up for each Bundle-Sell
To hide the short description that shows up for each Bundle-Sell, use the following snippet:
Set the Bundle Sells layout to Grid
To change the default Bundle-Sells layout and make them show up in a Grid layout, use the following snippet:
Set the Bundle Sells layout to Tabular
To change the default Bundle-Sells layout and make them show up in a Tabular layout, use the following snippet:
Display the bundled products’ full description
By default, bundled items display the short description of the corresponding Simple/Variable products.
To display the full description, use the following snippet: