I need to figure out the users who submitted orders last month but not this month. This is my current query to count total users, but how can I cross check to see who has bought this month but not the last? This is my the customer orders table this would be the expected output, a list of all the
Tag: orders
Filter orders by product post type in WooCommerce admin orders list page
I am new to WooCommerce, And I want to customize admin order list page. So basically I created new product type. Now I also made restriction that customer can purchase my custom product type’s product …
Count number of orders for a variation in Woocommerce
I have figured a way to do this, but I am finding my queries are taking way too long, and the more orders in Woocmmerce, and the more variations we add, the longer the query takes… I would hope there is a way in WC or WP to query just variation ids of an order, but alas, I havent found
Sort Orders IDs alphabetically based on the shipping last name in Woocommerce
I need to sort my $order_name (more specifically $order_shipping_last_name) alphabetically. I’ve tried many different basic php sort() methods, in many different places, and can’t get this to work. I’m assuming I’m missing something? In my code, get_all_orders_that_have_a_product_variation( $product_id ); function comes from this answer code that allow to get an array of orders IDs from a variation ID… The list