wc_get_brands()
Retrieves product's brands.
Хуков нет.
Возвращает
Массив
. List of terms
Использование
wc_get_brands( $post_id, $sep, $before, $after );
- $post_id(int)
- Post ID .
По умолчанию: 0) - $sep(строка)
- Seperator .
По умолчанию: ') - $before(строка)
- Before item ..
По умолчанию: '' - $after(строка)
- After item ..
По умолчанию: ''
Код wc_get_brands() wc get brands WC 9.8.1
function wc_get_brands( $post_id = 0, $sep = ', ', $before = '', $after = '' ) { global $post; if ( ! $post_id ) { $post_id = $post->ID; } return get_the_term_list( $post_id, 'product_brand', $before, $sep, $after ); }