• Resolved jurisly

    (@jurisly)


    Hello
    I’am using pro version and made my own template using proforma file
    All good from here
    Then, I want to display main category for each product into the order with this function in my template-functions.php

    add_action( 'wpo_wcpdf_before_item_meta', 'wpo_wcpdf_show_product_categories', 10, 3 );
    function wpo_wcpdf_show_product_categories ( $document_type, $item, $order ) {
        // get a comma separated list of categories (category links stripped)    
        echo '<div class="product-categories">'.wc_get_product_category_list( $item['product']->get_id() ).'</div>';
     }

    But nothing displayed on the pdf file

    Any tips or idea ?

    Thanks

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Display product category in PDF’ is closed to new replies.