Black Friday & Cyber Monday SUPER SALE ALL WEEK:
Grab 40% OFF on plugins
Days
Hours
Minutes
Seconds

How to Add Product Brand Name to WooCommerce Cart, Checkout, Emails & Admin Orders?

If you run a WooCommerce store that sells multiple brands, showing the product brand name alongside each product is crucial. Shoppers like to double-check the brand they are purchasing from. And on the admin side, having the brand info right in the order details can save you a lot of back-and-forth when processing orders.

But WooCommerce doesn’t make this easy. By default, brand names don’t show up on the cart, checkout, thank you page, emails, or even on the admin order page. In the image below, you can notice the product brand name doesn’t appear on the product page or cart page.

In this guide, we will add the WooCommerce product brand name everywhere it matters, so your customers (and you) always have that brand info front and center.

Solution: Add Product Brand Name to Cart, Checkout, Emails & Admin Orders

This code snippet will show the WooCommerce brand name on the single product page, cart and checkout pages, thank you page and order emails, and admin order details page.

// Get product brand term name(s) with links
function ts_get_product_brands( $product_id ) {
    $terms = get_the_terms( $product_id, 'product_brand' );
    if ( ! $terms || is_wp_error( $terms ) ) return '';

    $brand_links = array();
    foreach ( $terms as $term ) {
        $brand_links[] = '<a href="' . esc_url( get_term_link( $term ) ) . '">' . esc_html( $term->name ) . '</a>';
    }
    return implode( ', ', $brand_links );
}

/**
 * 1. Display product brand name(s) on Single Product Page
 */
add_action( 'woocommerce_single_product_summary', 'ts_display_single_product_brands', 4 );
function ts_display_single_product_brands() {
    global $product;
    if ( $brands = ts_get_product_brands( $product->get_id() ) ) {
        printf( '<h3 class="brand">%s</h3>', $brands );
    }
}

/**
 * 2. Display product brand name(s) in Cart & Checkout Pages
 */
add_filter( 'woocommerce_cart_item_name', 'ts_display_cart_item_brands', 10, 3 );
function ts_display_cart_item_brands( $product_name, $cart_item, $cart_item_key ) {
    if ( $brands = ts_get_product_brands( $cart_item['product_id'] ) ) {
        // Add link to product page in cart
        return sprintf('<a href="%s">%s</a><br>%s', esc_url( $cart_item['data']->get_permalink() ), $brands, $product_name );
    }
    return $product_name;
}

/**
 * 3. Display product brand name(s) in Admin Edit Order Pages
 */
add_filter( 'woocommerce_order_item_get_name', 'ts_display_admin_order_item_brands', 10, 2 );
function ts_display_admin_order_item_brands( $item_name, $item ) {
    if ( ! ( is_admin() && $item->is_type('line_item') ) ) {
        return $item_name;
    }

    global $pagenow, $typenow;
    $page   = isset( $_GET['page'] ) ? $_GET['page'] : '';
    $action = isset( $_GET['action'] ) ? $_GET['action'] : '';

    if ( $action === 'edit' && ( ( $pagenow === 'post.php' && $typenow === 'shop_order' ) || ( $pagenow === 'admin.php' && $page === 'wc-orders' ) ) ) {
        if ( $brands = ts_get_product_brands( $item->get_product_id() ) ) {
            return $brands . '<br>' . $item_name;
        }
    }

    return $item_name;
}

/**
 * 4. Display product brand name(s) in Order Pages & Emails
 */
add_filter( 'woocommerce_order_item_name', 'ts_display_order_item_brands', 10, 2 );
function ts_display_order_item_brands( $product_name, $item ) {
    // Prevent duplication in admin edit order pages
    if ( is_admin() && isset($_GET['action']) && $_GET['action'] === 'edit' ) {
        return $product_name;
    }

    if ( $brands = ts_get_product_brands( $item->get_product_id() ) ) {
        $product = $item->get_product(); // WC_Product object
        if ( is_wc_endpoint_url() ) { // My Account Orders
            return sprintf('<a href="%s">%s %s</a>', esc_url( $product->get_permalink() ), $brands, $product_name );
        } else {
            return $brands . ' ' . $product_name;
        }
    }
    return $product_name;
}

Output

Before we dive into the frontend experience, let’s take a quick look at the backend of the products page. Here, each product is assigned to a specific brand, such as Nike, Puma, Gucci, or Zara.

WooCommerce Brand Name

Single Product Page
When a customer visits a product page, the brand name now appears prominently above the product title.

Cart & Checkout Pages

On the cart and checkout pages, each product line displays the brand name alongside the product name.

WooCommerce Brand Name on Cart Page
WooCommerce Brand Name on checkout page

Thank You Page & Order Emails

After completing the purchase, customers see the brand name with the product name in both the thank you page and order confirmation emails.

WooCommerce Brand Name on Thank you page
WooCommerce Brand Name on Order Emails

Admin Order Page

Finally, for store admins, the brand name now appears clearly in the line items of each order. Admins can instantly see which brand each product belongs to, reducing errors when packing, shipping, or handling customer inquiries.

WooCommerce Brand Name on Admin order page

Showing the WooCommerce brand name across all pages helps with product recognition, but what if you also want to let customers filter products by brand on your shop page? Here’s a detailed guide: Add a Dropdown Field to Filter by Brands on the WooCommerce Shop Page

Browse more in: Code Snippets, WooCommerce How Tos, WooCommerce Tutorials

Share It:

Leave a Reply

Your email address will not be published. Required fields are marked *

Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible.

Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

By using our site, you acknowledge that you have read and understood our Privacy Policy and Terms & Conditions.