Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

woocommerce order get product weight

$item_weight=wp_get_post_terms($post->ID, 'pa_weight', array("fields" => "names"));

$send_array[] = array(

    'id' => get_the_ID(),
    'title' => get_the_title(),
    'content' => get_the_content(),
    'regular_price' => get_post_meta( get_the_ID(), '_regular_price', true),
    'sale_price'=> get_post_meta( get_the_ID(), '_sale_price', true),
    'weight' => $item_weight[0]

);
 
PREVIOUS NEXT
Tagged: #woocommerce #order #product #weight
ADD COMMENT
Topic
Name
9+7 =