Please submit a private ticket if you need to share sensitive information, such as license details and admin credentials.

Okay
  Public Ticket #3071467
Order items display in emails
Closed

Comments

  • Sean started the conversation

    Hi

    We're using Product Bundles to sell products that are made of of several different ingredients.

    As such, we use it only for stock control and we don't need to see an itemised breakdown of the bundle.

    In CSS I've successfully managed to hide the product itemised breakdown on relevant website pages. However, it is still displaying in order confirmation emails. How do I hide it? See this screenshot: https://www.evernote.com/l/AU1bqLBfe_pJPb4iECRBb-84HrqjRGTZqQU

  •  767
    Janilyn replied

    Hi Sean,

    Thank you for contacting WPClever Support Forum. 

    We’ve received your ticket and assigned one of our developers to help you with that. 

    He’ll be looking into your question and responding with specific instructions as soon as possible. 

    Please stay patient as we're having very heavy workloads, it might take some time for our developers to reach back.

    Best regards.

    Janilyn T. - WPClever Support Agent

  •  153
    Henry replied

    Hi Sean.

    Please add the below custom code (How to add custom code?)

    // hide bundled products on email & invoice
    add_filter( 'woocommerce_order_get_items', 'woosb_exclude_bundled_from_order', 10, 1 );
    if( !function_exists('woosb_exclude_bundled_from_order') ) {
        function woosb_exclude_bundled_from_order( $items ) {
            foreach ( $items as $key => $item ) {
                if ( $item->meta_exists( '_woosb_parent_id' ) ) {
                    unset( $items[ $key ] );
                }
            }
        
            return $items;
        }
    }


    Best regards,
    Henry N.