Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working with post_type => 'shop_order' ? #6

Closed
taliesinpenbardd opened this issue Jan 15, 2020 · 1 comment
Closed

Working with post_type => 'shop_order' ? #6

taliesinpenbardd opened this issue Jan 15, 2020 · 1 comment

Comments

@taliesinpenbardd
Copy link

Hey, I'm greatly interested in your project, since I have orders from a WooCommerce shop to batch process, but I can't make it work...
When defining the setup() method, neither $orders = get_posts([ "post_type" => "shop_order" ]); nor $orders = get_orders(); seem to retrieve anything.
error_log( print_r( $orders ) ); always prints an empty array...
I'm probably doing something wrong, but what? Is there any other info I can give you to help me debug that, if the problem comes from me?
Thanks by advance!

@gdarko
Copy link
Owner

gdarko commented Apr 26, 2020

Hello,

Sorry for my late reply, for woocommerce this should be used.

https://github.com/woocommerce/woocommerce/wiki/wc_get_orders-and-WC_Order_Query#usage

@gdarko gdarko closed this as completed Apr 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants