Support » Plugin: WooCommerce PDF Invoices & Packing Slips » product custom fields not showing for variable products

Viewing 1 replies (of 1 total)
  • Plugin Author Ewout

    (@pomegranate)

    Hi! Since WooCommerce 3.0, product variations are not tied as closely to the parent products as they used to anymore, meaning they do not inherit all the parent properties automatically (note that both parent products and variation products can have custom fields, so there’s no universal solution here).

    If you need the parent custom field, you can use $item['product']->parent instead of $item['product'] in the code.
    Same for product categories. Note that WC3.x has a new function for this too, this may work on both, worth a try:

    
    $category_list = wc_get_product_category_list( $item['product']->get_id() );
    

    Hope that helps!
    Ewout

Viewing 1 replies (of 1 total)
  • The topic ‘product custom fields not showing for variable products’ is closed to new replies.