• Resolved piliz

    (@piliz)


    Hi
    How can i display order item post meta with own php code? I want it to shown after product item. and im using your plugin for display as an thank you sharity PDF.

    Im using “Extra Product Options (Product Addons) for WooCommerce” to create extra fields on products for this to show.

    FIELD:
    -> order item post meta
    ->-> order_item_type: line_item
    The field is called: extra_text

    So, how can i show this field on the pdf.
    (i have premium plugin)

    Thanks // Fredrik

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

    (@pomegranate)

    Hello Fredrik,
    WooCommerce deprecated direct access to ‘post meta’ in favor of CRUD functions in version 3.0. There’s a function you can use to read item meta: wc_get_order_item_meta.

    
    <?php echo wc_get_order_item_meta( $item['item_id'], 'extra_text' ); ?>
    

    However, since you have the Premium Templates extension, you have two additional methods that don’t require any coding:

    1) Add in a separate column by using the “Item meta (single)” column block:

    2) Including it in the textbox of the product column (below the name):

    If you have further questions about the Premium Templates features, please send an email to [email protected] as we’re not allowed to handle support for our paid plugins via these forums.

Viewing 1 replies (of 1 total)
  • The topic ‘display order item post meta’ is closed to new replies.