Answers for "get woocommerce product by post id"

PHP
6

woocommerce get product id

global $product;
$product->get_id();
Posted by: Guest on July-03-2020
0

woocommerce get post terms product

$term_obj_list = get_the_terms( $post->ID, 'taxonomy' );
$terms_string = join(', ', wp_list_pluck($term_obj_list, 'name'));
Posted by: Guest on November-18-2020

Code answers related to "get woocommerce product by post id"

Browse Popular Code Answers by Language