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
- How to add multiple custom URL variables?
- How to get data from WordPress $wpdb into React Gutenberg Blocks Frontend?
- add_filter and remove_filter added before and after wp_query
- How to get all images and their thumbnails from wp media library
- product-attribute-slug-is-too-long-28-characters-max
- How to create a dynamic page based on form data with a plugin?
- How to Display Custom Post Type’s Gallery (images ) in Through WP_Query
- 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?
- Handling form request from plugin file
- Add multiple shipping rates from add_rate function with custom ID
- Woocommerce – Hide a Column in Cart Table
- Cannot search post by taxonomy
- Plugin development: get_post_meta is not working [closed]
- How to print raw query from WP_Query class just like in CodeIgniter
- Order properties should not be accessed directly
- WP_Query returns no results
- Finding posts containing matching array elements in a meta field usign WP_Query
- Create a custom display order in the main menu
- 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
- WooCommerce Admin Reports : Get custom product report based on date range
- 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?
- How do I apply a custom discount to individual product total prices depending on their categories on the cart and checkout pages of WooCommerce? [closed]
- 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 I can use order by of the custom post title?
- Remove an action by extending class and replacing it
- Woocommerce order empty items array
- How to get all product in the woo-commerce? [closed]
- Store custom meta box data as serialized array
- How to change WooCommerce loop product title HTML output in single product page and archive page
- Can woocommerse be used dynamically for billing from another plugin for payment processing?
- 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
- How to call code when adding WooCommerce menu items via woocommerce_account_menu_items
- Woocommerce – Provide Associated Category Link for Product List Plugin [closed]
- Pagination not working with custom 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
- Create Woocommerce product without creating api credentials
- Is it possible to use the MySQL’s ORDER BY FIELD() clause as part of the pre_get_posts hook?
- Add custom product data using javascript when add to cart button is clicked
- 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
- WC REST API Error Handling
- Pre-populated WooCommerce checkout fields: dropdown fields issue
- How to remove the WooCommerce Product->Category thumbnail from admin [closed]
- WP Query date_query with several date range
- woocommerce wc_get_product is not fetching all the product of particular category
- woocommerce add a new bulk action in the bulk actions dropdown in the orders list
- How to trigger WooCommerce user profile edit change?
- Override theme’s WooCommerce file
- WC_Geolocation not found inside plugin
- 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
- How can I query 3 posts from diferente categories (one of each category)
- Woocommerce Custom Checkout
- Woo-commerce: Adding additional page sections using a child theme
- Declaring a new woo commerce product type i get this error
- woocommerce single product page hook not working
- Get custom wp_query search results to appear on search.php
- How to remove city field from order in dashboard?
- How to design WooCommerce-like admin tabs for plugin settings page?
- WooCommerce adds a newline symbol (\n) between email recipients
- Allow HTML in product attributes and variation for WooCommerce
- How do I add multiple custom menu Woo-commerce my account page?
- High-Performance Order Storage conflict action `manage_shop_order_posts_custom_column`