• $terms = get_the_terms($post->ID, ‘product_cat’);
    foreach ($terms as $term) {
    $product_slug = $term->slug;
    $product_slug = $term2->slug;
    break;
    };

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘echo $product_cat not working’ is closed to new replies.