// Display "completed" orders count $statuses = ['completed']; $orders = wc_get_orders( ['limit' => -1, 'status' => $statuses] ); echo '
' . sprintf( __('Count of "%s" ...
... Only orders with status "completed" (others common status: 'wc-on-hold' or 'wc- processing') 'post_status' => 'wc-completed', // all posts ...
Completed orders which get cleaned up will be anonymized so sales stats are ...
Since Woocommerce mega major Update 3.0+ things have changed quite a lot: WC_Order properties can't be access directly as before and will throw some ...
Order statuses (processing, completed, etc), are post statuses, so you can't just used 'publish'. You also don't want to hard-code the core ...
Here's an example of how to query completed orders by date:
If you sell virtual products like services, you probably have to do something between when the order is paid and completed. However, this isn't the case for all ...
function items_count() { function get_purchased_products() { $products = array(); // Get all customer orders $customer_orders = get_posts( array( 'numberposts' ...
The order status (e.g. Completed or Processing) - use the status column.