Replies: 0
Hello
I’m using following hook to display product attribute in invoice:
add_action( 'wpo_wcpdf_after_item_meta', 'wpo_wcpdf_show_product_attributes', 10, 3 );
function wpo_wcpdf_show_product_attributes ( $template_type, $item, $order ) {
if(empty($item['product'])) return;
$document = wcpdf_get_document( $template_type, $order );
printf('<div class="product-attribute">Attribute name: %s</div>', $document->get_product_attribute('Attribute name', $item['product']));
}
But is it possible to exclude certain category products? I need to display product attribute with all products in all categories except one specific category.
Is it possible somehow to modify this hook to exclude certain category products?
Thanks in advance!