wc_get_product_terms( int $product_id, string $taxonomy, array $args = array() )
Wrapper used to get terms for a product.
Description Description
Parameters Parameters
- $product_id
-
(Required) Product ID.
- $taxonomy
-
(Required) Taxonomy slug.
- $args
-
(Optional) Query arguments.
Default value: array()
Return Return
(array)
Source Source
File: includes/wc-term-functions.php
176 177 178 179 180 181 182 | 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 ); } |