Hiding product meta with specific variation

[ad_1]

Hi,
I’m trying to achieve hiding specific variation info from my invoice meta:

In this case this variation is sort of the default choice and it should not show up in my invoice. Surely I can set this up by this hack in invoice.php like this:

<?php

$product_variables = array(‘151963’, ‘151953’, ‘151880’, ‘151889’, ‘151856’, ‘151847’, ‘151801’, ‘152101’, ‘152097’, ‘151389’, ‘151393’, ‘151810’, ‘151220’) ?>

<?php if ( !in_array($item[‘variation_id’], $product_variables )) : ?>

<span class=”item-meta”><?php echo $item[‘meta’]; ?></span>

<?php endif; ?>

This does the trick, but is inconvenient to keep up to date. I would like to hide the meta based on attribute id, but I can’t figure how to do it. Does this info exist in the order object? I also have the pro version, but could not figure it out how to use it on my advantage here.

Any ideas for a better solution than junky mega array?

And big thanks for a great plugin!

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer