wc_get_product_terms()
Wrapper used to get terms for a product.
Хуки из функции
Возвращает
Массив
.
Использование
wc_get_product_terms( $product_id, $taxonomy, $args );
- $product_id(int) (обязательный)
- Product ID.
- $taxonomy(строка) (обязательный)
- Taxonomy slug.
- $args(массив)
- Query arguments.
По умолчанию: array()
Код wc_get_product_terms() wc get product terms WC 8.7.0
function wc_get_product_terms( $product_id, $taxonomy, $args = array() ) { if ( ! taxonomy_exists( $taxonomy ) ) { return array(); } return apply_filters( 'woocommerce_get_product_terms', _wc_get_cached_product_terms( $product_id, $taxonomy, $args ), $product_id, $taxonomy, $args ); }