Hi again,
It turns out there is a way:
function wc_get_product_brand( $product_id ) {
return implode(‘, ‘, wp_get_post_terms($product_id, ‘pwb-brand’, [‘fields’ => ‘names’]));
}
add_filter( ‘woocommerce_order_item_name’, ‘customizing_order_item_name’, 10, 2 );
function customizing_order_item_name( $product_name, $item ) {
$product = $item->get_product(); // The WC_Product Object
$permalink = $product->get_permalink(); // The product permalink
if( $brand = wc_get_product_brand( $item->get_product_id() ) ) {
if ( is_wc_endpoint_url() )
return sprintf('<a href="%s">%s %s</a>', esc_url($permalink), $brand, $product->get_name());
else
return $brand . ' ' . $product_name;
}
return $product_name;
}
Tested and working
Thank you for pointing out that this it outside the plugin’s features