• Resolved ConfusedTA

    (@confusedta)


    Hi,

    I have added some custom fields for product variations, using the code found here:
    http://www.remicorson.com/woocommerce-custom-fields-for-variations/

    These are being used to show my Stock Locations (the field is called “product_allocated_number”).

    However, on my variation products, this is showing up in the product_meta area of the invoice, as such: http://i.imgur.com/UcZVMJJ.png

    I know that I could remove <span class="item-meta"><?php echo $item['meta']; ?></span> from my template, and hide all of the meta, however, I still want to show the meta which shows which variation of the product was selected.

    I only wish to remove a specific bit of meta from the list – is there a way to filter the meta before it is loaded (without editing the core class-wcpdf-export.php file to filter prior to calling WC_Order_Item_Meta)?

    Other than this small hiccup, this plugin looks perfect for me, and provides a much nicer default template than other invoice/delivery note printing plugins.

    Thanks in advance!

    https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ConfusedTA

    (@confusedta)

    I have been playing some more, and have figured this out!

    By switching to HTML output, I was able to use Chrome’s Inspect Element, and I discovered that each bit of Meta is given a class, named by the meta name.

    With this, it’s then just a simple case of adding the following to my CSS:

    .variation-product_allocated_number {
        display: none;
    }

    This then gives me the desired result: http://i.imgur.com/dObl4Y5.png

    Thanks for making this plugin so well!

    Plugin Contributor Ewout

    (@pomegranate)

    Awesome, glad you figured it out so quickly :o)

    Have a great day!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Removing specific Variation Meta’ is closed to new replies.