• Hi. I want to remove only the main product bundle from ORDERS in admin dashboard.

    I have:

    Bundle name — price 0
    bundle item – price 50
    bundle item – price 100
    bundle item – price 30

    I just want to remove bundle name with price 0 from orders and display only bundle items.
    I dont find any resolve on forum or google, someone can help me with a snipped or smth?
    Thank you so much

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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,

    Thread Starter Andrei O Laurentiu

    (@wefixitio)

    Hi, sorry for late answer. It works !!!!! Thank you so much @miemie

    Thread Starter Andrei O Laurentiu

    (@wefixitio)

    @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.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hide/Remove product bundle from order’ is closed to new replies.