Answers for "woocommerce list all categories and products"

0

woocommerce get product categories

$terms = get_the_terms( $product_id, 'product_cat' );
foreach ($terms as $term) {
    $product_cat_id[] = $term->term_id;
}
Posted by: Guest on July-23-2021

Code answers related to "woocommerce list all categories and products"

Browse Popular Code Answers by Language