wc_get_brand_thumbnail_url()WC 1.0

Helper function :: wc_get_brand_thumbnail_url function.

Хуков нет.

Возвращает

Строку.

Использование

wc_get_brand_thumbnail_url( $brand_id, $size );
$brand_id(int) (обязательный)
Brand ID.
$size(строка)
Thumbnail image size.
По умолчанию: 'full'

Код wc_get_brand_thumbnail_url() WC 9.8.2

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 ) : '';
}