Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
/**
* Plugin Name: WooCommerce Product Bundles - Prevent Subtotals Aggregation
* Plugin URI: https://woocommerce.com/products/product-bundles/
* Description: Prevents Product Bundles from displaying aggregated item subtotals in cart/order templates. Requires v5.5+.
* Version: 1.0
* Author: SomewhereWarm
* Author URI: https://somewherewarm.gr/
* Developer: Manos Psychogyiopoulos
*
* Requires at least: 4.1
* Tested up to: 5.3
*
* Copyright: © 2017-2020 SomewhereWarm SMPC (info@somewherewarm.gr).
* License: GNU General Public License v3.0
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/
add_filter( 'woocommerce_bundles_group_mode_options_data', 'sw_pb_group_mode_options_data' );
function sw_pb_group_mode_options_data( $data ) {
$data[ 'parent' ][ 'features' ] = array( 'parent_item', 'child_item_indent' );
return $data;
}
@Heffreyy

This comment has been minimized.

Copy link

@Heffreyy Heffreyy commented Feb 22, 2021

Hi, I'm unable to confirm my email address on my woocommerce account but I need help with this plugin I've just purchased.

This snipped is supposed to change the way the totals are shown in the checkout. I need the subtotal of each item in the bundle to be hidden and only the calculated total shown on the row with the product bundle itself. this snippet seems to do the opposite. Any help would be appreciated.

@jimjasson

This comment has been minimized.

Copy link

@jimjasson jimjasson commented Feb 23, 2021

Hey @Heffreyy! You may hide bundled item totals in cart/checkout by navigating to the Advanced Settings of each bundled item and changing the Price Visibility settings: https://a.cl.ly/E0u9yEpR.

@Heffreyy

This comment has been minimized.

Copy link

@Heffreyy Heffreyy commented Feb 23, 2021

Hey @Heffreyy! You may hide bundled item totals in cart/checkout by navigating to the Advanced Settings of each bundled item and changing the Price Visibility settings: https://a.cl.ly/E0u9yEpR.

Thank you so much for pointing me to that setting. It's exactly what I needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment