Hi @wefixitio,
Please add below snippet (How to add custom code?):
add_filter( 'woocommerce_order_get_items', 'woosb_exclude_bundles_from_order', 10, 1 );
function woosb_exclude_bundles_from_order( $items ) {
foreach ( $items as $key => $item ) {
if ( $item->meta_exists( '_woosb_ids' ) ) {
unset( $items[ $key ] );
}
}
return $items;
}
Regards,
Hi, sorry for late answer. It works !!!!! Thank you so much @miemie
@miemie still have a problem. Now, you code its working but, if i want to make a percentage discount on bundle, on order total its ok, if i want to make a fixed amount discount, doesnt work, discount appear in orders but if i do recalculate total , is going to original bundle price without discount so, if i generate an invoice, is the full price withound fixed amount discount.
The problem is only on fixed amount and just after i put the cod for hide main bundle product.
You have some code to make with fixed amount like percentage? Thanks
@miemie: using the above code. I also asked the same thing. If you use fixed pricing, the total transaction does not match because in the Items Subtotal field the value is 0.
You have some code to show item subtotal for some fixed pricing product bundling enable?
-
This reply was modified 2 years, 5 months ago by
alubis.