Hiding product meta with specific variation
-
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!
- The topic ‘Hiding product meta with specific variation’ is closed to new replies.