1. Documentation
  2. Plugins
  3. WooCommerce
  4. Extensions
  5. Product Bundles

Snippets

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:

Show an “optional” suffix in optional bundled item titles ↑ Back to top

To add an “- optional” suffix next to the title of bundled items that have been marked as optional, 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:

Hide the remaining stock of the parent item ↑ Back to top

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 ↑ Back to top

By default, bundled items display the short description of the corresponding Simple/Variable products.

To display the full description, use the following snippet:

Questions & Support ↑ Back to top

Have a question before you buy? Please fill out this pre-sales form.
Already purchased and need assistance? Get in touch with us via the Help Desk!

WooCommerce - the most customizable eCommerce platform for building your online business.

  • 30 day money back guarantee
  • Support teams across the world
  • Safe & Secure online payment