wc_get_product_category_list( int $product_id, string $sep = ', ', string $before = '', string $after = '' )
Returns the product categories in a list.
Description Description
Parameters Parameters
- $product_id
-
(Required) Product ID.
- $sep
-
(Optional) (default: ', ').
Default value: ', '
- $before
-
(Optional) (default: '').
Default value: ''
- $after
-
(Optional) (default: '').
Default value: ''
Return Return
(string)
Source Source
File: includes/wc-product-functions.php
function wc_get_product_category_list( $product_id, $sep = ', ', $before = '', $after = '' ) { return get_the_term_list( $product_id, 'product_cat', $before, $sep, $after ); }