wc_get_product_category_list() WC 1.0
Returns the product categories in a list.
No Hooks.
Return
String.
Usage
wc_get_product_category_list( $product_id, $sep, $before, $after );
- $product_id(int) (required)
- Product ID.
- $sep(string)
- (default: ', ').
- $before(string)
- (default: '').
- $after(string)
- (default: '').
Code of wc_get_product_category_list() wc get product category list WC 5.0.0
function wc_get_product_category_list( $product_id, $sep = ', ', $before = '', $after = '' ) {
return get_the_term_list( $product_id, 'product_cat', $before, $sep, $after );
}