/** * Gets WooCommerce product brands in a list. * * @see https://wpcodebook.com/snippets/get-woocommerce-product-brands-in-a-list/ * @see https://developer.wordpress.org/reference/functions/get_the_term_list/ */ function wpcodebook_get_product_brand_list( $product_id, $sep = ', ', $before = '', $after = '', $do_strip_tags = true ) { $brands = get_the_term_list( $product_id, 'pwb-brand', $before, $sep, $after ); return ( $do_strip_tags ? strip_tags( $brands ) : $brands ); }
The pwb-brand
taxonomy is from the Perfect Brands for WooCommerce plugin.