Content of the page

WooCommerce Product Bundles

Content of the article

Plugin linkhttps://woocommerce.com/products/product-bundles/

Add next code to the file: \plugins\woocommerce-product-bundles\includes\class-wc-product-bundle.php

if (class_exists('WOOCS')) {
    global $WOOCS;
    $bundle_price_data['base_price'] = $WOOCS->woocs_exchange_value($base_price);
    $bundle_price_data['base_regular_price'] = $WOOCS->woocs_exchange_value($base_regular_price);
} else {
    $bundle_price_data['base_price'] = $base_price;
    $bundle_price_data['base_regular_price'] = $base_regular_price;
}

Then add next code to the same file as on the screen:

if (class_exists('WOOCS')) {
    global $WOOCS;
    $bundle_price_data['prices'][$bundled_item->item_id] = $WOOCS->woocs_exchange_value($bundled_item->get_bundled_item_price('min'));
    $bundle_price_data['regular_prices'][$bundled_item->item_id] = $WOOCS->woocs_exchange_value($bundled_item->get_bundled_item_regular_price('min'));
} else {
    $bundle_price_data['prices'][$bundled_item->item_id] = $bundled_item->get_bundled_item_price('min');
    $bundle_price_data['regular_prices'][$bundled_item->item_id] = $bundled_item->get_bundled_item_regular_price('min');
}

Then add next code yo the file\plugins\woocommerce-product-bundles\templates\single-product\bundled-product-variable.php

if (class_exists('WOOCS')) {
    global $WOOCS;
    for ($i = 0; $i < count($bundled_product_variations); $i++) {
	      $bundled_product_variations[$i]['price'] = $WOOCS->woocs_exchange_value($bundled_product_variations[$i]['price']);
	      $bundled_product_variations[$i]["regular_price"] = $WOOCS->woocs_exchange_value($bundled_product_variations[$i]['price']);
    }
}