• Hi,

    Is it possible to not show the bundled products in wp-admin order? Just the bundle itself will do.

    Hope to hear from you.

    Thank you!

    Regards
    Manhua

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WPClever

    (@wpclever)

    Hi @manhua777

    Yes, you can do that. Please add below snippet to current-theme (or child-theme) / functions.php

    add_filter( 'woocommerce_order_get_items', 'woosb_exclude_bundled_from_order', 10, 1 );
    function woosb_exclude_bundled_from_order( $items ) {
    	foreach ( $items as $key => $item ) {
    		if ( $item->meta_exists( '_woosb_parent_id' ) ) {
    			unset( $items[ $key ] );
    		}
    	}
    
    	return $items;
    }

    Hi,

    I want basically a code for to do the exact opposite of what manhua777 wanted, I want only the bundled products and not the bundle itself.

    For instance:

    Bundle ''SET'' is composed of items ''POT'' and ''LID'' 
    
    I want that when ''SET'' gets purchases the following order should get forwarded to my ERP / Stock management system.
    
    ORDER 1: ''POT'' + ''LID'' 
    
    NOT: ''SET'' + ''POT'' + ''LID'' 
    
    Thus, only the items get to my system and NOT the bundles.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Not show bundled products in wp-admin order’ is closed to new replies.