Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support jmatiasmastro

    (@jmatiasmastro)

    @mgz069 Hi mate, we inform you that it is outside the plugin’s features.

    Best regards, Quadlayers Support Team.

    Thread Starter Johny English

    (@mgz069)

    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

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.