Use Wp_Query instead it will give you the option to get data with status.
$args = array(
'post_type' => 'shop_order',
'posts_per_page' => '-1',
'post_status' => array('publish', 'pending', 'draft', 'auto-draft', 'future','private', 'inherit', 'trash')
);
$my_query = new WP_Query($args);
$orders = $my_query->posts;
echo "<pre>";
print_r($orders);
echo "</pre>";
it will display All of your order.
hope this will help you out.
Related Posts:
- How to get orders with used coupon in WooCommerce
- Making Woocommerce optimized for more than 500k products
- What is the meta_query key name for the woo product average rating? [closed]
- Return custom product in ajax call loop
- WP_Query leaking absurd amounts of memory
- Register custom query args parameter for WP_Query()
- Check for featured image in WP_Query
- How to get data from WordPress $wpdb into React Gutenberg Blocks Frontend?
- How to ensure “the_content” filter runs only for the main displayed content?
- add_filter and remove_filter added before and after wp_query
- product-attribute-slug-is-too-long-28-characters-max
- get all products of one category
- Woocommerce add custom button to backend order table
- Plugin vs Settings load order (woocommerce dependency)
- How do I hook a custom discount to change a WC_Order price total on WooCommerce?
- Add multiple shipping rates from add_rate function with custom ID
- Print value of an array or variable in a payment plugin
- Cannot search post by taxonomy
- Plugin development: get_post_meta is not working [closed]
- $wpdb -> Batch insert from XML File?
- How to print raw query from WP_Query class just like in CodeIgniter
- WP_Query returns no results
- How to check if Woocommerce Order number equals to post ID?
- How do I add custom column to woocommerce cart?
- How plugins_loaded works?
- manage_posts_custom_column, showing serial number using increment in loop
- Slow WP_query due to nested wp_query. Need Suggestions
- WooCommerce Conditional Tag inside plugin
- WooCommerce registration password field not displaying
- update woocommere total value on checkout based on selected payment method
- how to add custom functionality after woocommerce place order button
- ORDER BY wp_post custom column name in wp_query
- Woocommerce checkout update totals with datepicker
- Strange issue saving custom field data for a WooCommerce order
- PHP – Extend WordPress Woocommerce Revenue Analytics with custom field
- Woocommerce – Convert Delivery method into a custom field
- How can we display product price $104 on the cart while the credit card payment method is checked?
- In woocommerce cart item we can add custom text but how can i add custom link? [closed]
- Updating Woocommerce Settings API when WordPress Settings API saved and vise versa
- How to extend WooCommerce API to show bookable product availability rules?
- Customize WooCommerce my account dashboard through plugin
- Woocommerce Composite Products – Add a composite product to cart programmatically via ajax [closed]
- Search: how to extend the existing search to include a custom table
- how to get all the child category name in a specified category name?
- Change WooCommerce Email Header using custom plugin
- How I can use order by of the custom post title?
- Remove an action by extending class and replacing it
- Prevent WordPress automatically processing certain URL queries
- Woocommerce order empty items array
- Store custom meta box data as serialized array
- WooCommerce change Tax Class programmatically when Recalculating an existing Order [closed]
- How to change WooCommerce loop product title HTML output in single product page and archive page
- Sending an SMS on new order placed – WooCommerce
- Can we use a library under MIT license in a WooCommerce plugin?
- Set _regular_price 0 if empty in woocommerce product
- Woocommerce – Provide Associated Category Link for Product List Plugin [closed]
- Get post thumbnail in WP_Query
- Get Posts by IDs (optionally)
- Remove Products From Category
- want to show CMB2 metabox on woocommerce product data tab
- Dynamic page generation upon purchase of a product
- Customise Grouped Product display in Woocommerce with custom column
- Make a php array load faster
- Create Woocommerce product without creating api credentials
- Woocommerce place order update shipping price
- Add custom product data using javascript when add to cart button is clicked
- Multiple dynamic Tax Query – pass taxonomy argument from array
- Trying to run a Ajax request from a checkout form in woocommerce via a custom plugin
- Securing custom rest API endpoints with public access from PWA
- WP_Query not ordering correctly
- WooCommerce – Stop assigning order numbers
- Adding customs fields on each product on the cart
- Override woocommerce loop-start.php from theme using plugin?
- How to direct WordPress to load custom template for custom post type
- Redirect WooCommerce checkout to cart
- Pre-populated WooCommerce checkout fields: dropdown fields issue
- Woocommerce Product finder feature on home page
- WP Query date_query with several date range
- Woocommerce product not appearing in category list page when created programatically [closed]
- How to trigger WooCommerce user profile edit change?
- Override theme’s WooCommerce file
- WC_Geolocation not found inside plugin
- WordPress Reset password Strength set to medium
- How to use functions from Woocommerce documentation?
- how to retrieve post_id under woocommerce_add_to_cart_validation hook?
- Post Pagination does not working on WP-Query
- WP Query Relations / Compare
- Woocommerce Custom Checkout
- Woo-commerce: Adding additional page sections using a child theme
- WP: adding Javascript to specific woo commerce pages
- woocommerce single product page hook not working
- Can’t get query string in ajax call
- How to remove city field from order in dashboard?
- get the queried_object of an url
- WooCommerce adds a newline symbol (\n) between email recipients
- filter on get_posts efficiently
- Allow HTML in product attributes and variation for WooCommerce
- How do I add multiple custom menu Woo-commerce my account page?
- I want to redirect user to an amazon product page from my wordpress website when they add product to there cart [closed]
- Custom fields in the billing address section woocommerce