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.
Snippets ↑ Back to top
Make optional bundled items checked/selected by default ↑ Back to top
By default, optional bundled item checkboxes are unticked by default. This can be changed with the following snippet:
Remove the “optional” suffix from optional bundled item titles ↑ Back to top
By default, the extension adds an “- optional” suffix next to the title of bundled items that have been marked as optional. To remove this suffix, use the following snippet/plugin:
Calculate discounted bundled item prices over regular prices ↑ Back to top
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:
Prevent product bundles price strings from showing up in range-format ↑ Back to top
Ensure that you are using the latest version of Product Bundles, then use the following snippet/plugin:
Change the number of bundled product columns displayed when the Grid Layout option is active ↑ Back to top
The following snippet demonstrates how to adjust the number of bundled item columns to 4:
Change the appearance of item subtotals in the cart/orders ↑ Back to top
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: