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
- Fatal error: Class ‘ms\WP_Query’ not found on plugin initialization [closed]
- Register custom query args parameter for WP_Query()
- How to add multiple custom URL variables?
- Getting wrong relationship value in $args in wp_Query?
- Check for featured image in WP_Query
- Why Does get_posts() Return an Empty Set?
- WooCommerce get Shipping Class of product from either the product id or the order after order is completed
- How to get data from WordPress $wpdb into React Gutenberg Blocks Frontend?
- How to iterate through custom posts and add the title to an array
- get_posts / WP_Query Memory size of 134217728 bytes exhausted
- How to ensure “the_content” filter runs only for the main displayed content?
- 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?
- get all products of one category
- 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
- set_sale_price in WooCommerce [closed]
- Woocommerce – Hide a Column in Cart Table
- Print value of an array or variable in a payment plugin
- Cannot search post by taxonomy
- WP_Query with tax_query, order by most ‘matches’
- How to update total price of completed order in woocommerce? [closed]
- Plugin development: get_post_meta is not working [closed]
- $wpdb -> Batch insert from XML File?
- How do I change the initial quantity of a product in woocommerce?
- 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
- Error : “Cannot use object of type WP_Post as array in”
- Proper way to run wp_query from inside a plugin
- using new WP_Query in save_post function alters $post
- Slow WP_query due to nested wp_query. Need Suggestions
- WooCommerce Conditional Tag inside plugin
- Custom attribute type not displaying terms in edit product – WooCommerce
- WooCommerce registration password field not displaying
- Show special field when correct shipping is chosen
- 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
- ORDER BY wp_post custom column name in wp_query
- Adding a brand column to WooCommerce Products
- Woocommerce checkout update totals with datepicker
- How to create database table, add data, update and delete using wpdb via plugins?
- 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
- Elementor custom Query with ACF fields to show matching woocommerce products custom fields
- “import declarations may only appear at top level of a module” when importing WooCommerce API node module
- Woocommerce extend tax report with custom column
- How can we display product price $104 on the cart while the credit card payment method is checked?
- WP_Query filters
- Show disclaimer with accept button before redirecting to the payment gateway website
- 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
- Can’t get woocommerce_get_price_html to work [closed]
- How to fetch only current hour posts?
- How to get Metabox custom field to show checked if value is updated using post meta query?
- How to restrict access to image folder depending on whether product is purchased or not?
- How to extend WooCommerce API to show bookable product availability rules?
- Customize WooCommerce my account dashboard through plugin
- woocommerce_checkout_order_processed hook executing function twice
- WordPress pre_get_posts with combined results of two queries (OR)
- Is there a way in which I can compare product id with the order id to display content on front end before placing the order? [closed]
- 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?
- how to invoke wordpress API from other existing PHP system
- Redirect to another page using contact form 7? [closed]
- Change WooCommerce Email Header using custom plugin
- How I can use order by of the custom post title?
- UWooCommerce – add cart discount programmatically?
- How to query children by post name/slug
- 400 Bad Request, in wordpress theme development, wp_ajax
- Remove an action by extending class and replacing it
- Prevent WordPress automatically processing certain URL queries
- Woocommerce Reviews tab not showing on single product page
- WordPress Cron Job not importing products
- WP_List_Table sortable column with WC_Order_Query doesn’t work
- Resending woo-commerce order emails from frontend
- how to execute a function only when i send an order to trash [closed]
- Are woocommerce_thankyou hook and is_order_received_page() redundant? [closed]
- Weekly cron is either missing the schedule or triggered too many times on Fridays