wc_get_brand_thumbnail_url()WC 1.0

Helper function :: wc_get_brand_thumbnail_url function.

No Hooks.

Return

String.

Usage

wc_get_brand_thumbnail_url( $brand_id, $size );
$brand_id(int) (required)
Brand ID.
$size(string)
Thumbnail image size.
Default: 'full'

wc_get_brand_thumbnail_url() code WC 9.5.1

function wc_get_brand_thumbnail_url( $brand_id, $size = 'full' ) {
	$thumbnail_id = get_term_meta( $brand_id, 'thumbnail_id', true );

	if ( $thumbnail_id ) {
		$thumb_src = wp_get_attachment_image_src( $thumbnail_id, $size );
	}

	return ! empty( $thumb_src ) ? current( $thumb_src ) : '';
}