• Resolved johnegg

    (@johnegg)


    Hi guys

    Great plugin thanks! How do I add product ids for each order to the pdfs please?

    cheers
    john

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hi! You can do this with a small code snippet:

    
    add_action( 'wpo_wcpdf_after_item_meta', 'wpo_wcpdf_show_product_id', 10, 3 );
    function wpo_wcpdf_show_product_id ( $template_type, $item, $order ) {
        echo '<div class="product-id">Product ID: '.$item['product_id'].'</div>';
    }
    

    Read this if you haven’t worked with code snippets like this before: How to use filters

    Hope that helps!

    Thread Starter johnegg

    (@johnegg)

    Wow, that worked perfect! Thanks ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add product id to pdfs’ is closed to new replies.