WooCommerce – Show orders for a specific product ?
‘shop_order’,
‘post_status’ => ‘publish’,
‘posts_per_page’ => 50,
‘order’ => ‘DESC’,
‘item_meta’ => array (
‘_sku’ => ‘ABCD’,
),
‘tax_query’ => array(
array( ‘taxonomy’ => ‘shop_order_status’,
‘field’ => ‘slug’,
‘terms’ => array (‘Pending’ , ‘Failed’ , ‘Processing’ , ‘Completed’, ‘On-Hold’ , ‘Cancelled’ , ‘Refunded’)
)
)
);
?>
id) : ?>id; ?> |
get_items())>0) { foreach($order->get_items() as $item) { $_product = get_product( $item[‘product_id’] ); echo ” . $_product->sku . ”; } } ?> |
get_items())>0) { foreach($order->get_items() as $item) { $_product = get_product( $item[‘product_id’] ); echo $_product->get_categories( ‘, ‘, ” . _n( ”, ”, $size, ‘woocommerce’ ) . ‘ ‘, ‘ ‘ ); } } ?> |
get_items())>0) { foreach($order->get_items() as $item) { $_product = get_product( $item[‘product_id’] ); echo ” . $item[‘name’] . ”; } } ?> |
order_total): $preco_format=($order->order_total);?> |
billing_first_name) : ?>billing_first_name; ?> billing_last_name) : ?>billing_last_name; ?> |
billing_email) : ?>billing_email; ?> | status) : ?>status; ?> |