Answers for "woocommerce custom product order"

0

woocommerce order item get product id

foreach ( $items as $item ) {
    $product_name = $item->get_name();
    $product_id = $item->get_product_id();
    $product_variation_id = $item->get_variation_id();
}
Posted by: Guest on September-01-2020
0

orderby total sales woocommerce

$args = array(
  'post_type' => 'shop_order',
  'posts_per_page' => 2000,
  'orderby'   => 'meta_value_num',
  'meta_key'  => 'total_sales',
  ),
);
Posted by: Guest on October-20-2020

Code answers related to "woocommerce custom product order"

Browse Popular Code Answers by Language