• Resolved digvijaypatil

    (@digvijaypatil)


    Hello,
    I am using ‘WooCommerce PDF Invoices & Packing Slips’plugin for generating invoice.
    Is there any setting to show only bundle in invoice.? Currently my invoice shows both bundle and bundled products.

    The page I need help with: [log in to see the link]

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

    (@wpclever)

    Hi @digvijaypatil ,

    We would like to let you know that your developers are looking at your issue and hopefully, we’ll catch you back with a solution soon. Please be patient cause this might take several days due to the heavy workloads.

    Thank you for your understanding and support of our plugin.

    WPClever.

    Thread Starter digvijaypatil

    (@digvijaypatil)

    Thank you for the reply.
    Please let me know when you come to the solution.

    Plugin Author WPClever

    (@wpclever)

    Hi,

    Please try to add below code to your theme (or child-theme) > functions.php

    
    add_filter( 'wpo_wcpdf_order_items_data', 'woosb_wcpdf_order_items_data' );
    function woosb_wcpdf_order_items_data( $data_list ) {
        foreach ( $data_list as $key => $data ) {
            $bundle          = wc_get_order_item_meta( $data['item_id'], '_woosb_ids', true );
            $bundled_product = wc_get_order_item_meta( $data['item_id'], '_woosb_parent_id', true );
            if ( ! empty( $bundle ) ) {
                // hide bundle
                //unset( $data_list[ $key ] );
            }
            if ( ! empty( $bundled_product ) ) {
                // hide bundled product
                unset( $data_list[ $key ] );
            }
        }
        return $data_list;
    }
    
    Thread Starter digvijaypatil

    (@digvijaypatil)

    It works..!! Thank you very much.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to show only bundled product in invoice’ is closed to new replies.