Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter dmnick

    (@dmnick)

    Please help i think it is easy question tried this but didn’t help

    $orders = get_posts( array(
            'post_type'   => 'shop_order',
            'post_status' =>  array('pending','processing','on-hold','completed','cancelled','refunded','failed')
    ) );

    As described here Develop Woocommerce, this is the right way:
    array( ‘wc-processing’, ‘wc-completed’, … )

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Get all orders.’ is closed to new replies.