wordpress query order code example
Example 1: wordpress query orderby name
query_posts( array(
'post_type' => 'page',
'posts_per_page' => -1,
'orderby' => 'title',
'order' => 'ASC'
) );
Example 2: wordpress get order
$order = wc_get_order( $order_id );
$order_id = $order->get_id();
$parent_id = $order->get_parent_id();
$user_id = $order->get_user_id();
$user = $order->get_user();
$order_status = $order->get_status();
$currency = $order->get_currency();
$payment_method = $order->get_payment_method();
$payment_title = $order->get_payment_method_title();
$date_created = $order->get_date_created();
$date_modified = $order->get_date_modified();
$billing_country = $order->get_billing_country();