• Resolved Radekim

    (@radekim)


    Hi, great plugin! Is there any way how to extract specific meta variation items? Plugin generates them all through <span class=”item-meta”><?php echo $item[‘meta’]; ?></span> but I would like to customize some of them separately – reorder, hide, highlight etc. I mean variations like color, size, type (set is done) in order to make invoice yet nicer :-). Thanks

    https://ww.wp.xz.cn/plugins/woocommerce-pdf-invoices-packing-slips/

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

    (@pomegranate)

    Hello Radekim,
    The item meta as supplied by $item[‘meta’] comes straight from WooCommerce, including the formatting.

    Most of the raw data is stored in $item[‘item’][‘item_meta’], you can see what’s available (just for testing) by adding the following code to your template:

    <pre><?php print_r($item['item']['item_meta']); ?></pre>

    once you have extracted the right keys from that array, you can then echo the meta using that key, for example:

    Color: <?php echo $item['item']['item_meta']['color']; ?>

    Hope that helps!
    Ewout

    Thread Starter Radekim

    (@radekim)

    Thank you for a prompt reply!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Meta items customization’ is closed to new replies.