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