Closed michael-xiii closed 4 years ago
Issue-Label Bot is automatically applying the label type: bug
to this issue, with a confidence of 0.97. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
@michael-xiii I am not able to reproduce the issue on my end.
Please see below where I can successfully retrieve order by Order Id:
It is possible that one of the plugins installed on the site is interfering. Have you tried testing with all plugins deactivated except for WooCommerce?
@michael-xiii I am closing this issue due to inactivity. Please feel free to comment on it in case we missed something. We'd be happy to take another look.
Describe the bug
Looks like Woocommerce API not correctly processing orders number argument - it got Wordpress ID instead expected ORDER_NUMBER
To Reproduce Find the order's number in the admin area and call API
curl https://xxx.com/wp-json/wc/v3/orders/25229 -u xxx:xxx
404.
Next - find the ID (from Wordpress Admin Edit link for example) and call method with
curl https://xxx.com/wp-json/wc/v3/orders/156100 -u xxx:xxx
Data FOUND
Expected behavior Based on the doc and the ELEMENTARY LOGIC http://woocommerce.github.io/woocommerce-rest-api-docs/?python#retrieve-an-order ID - should be an ORDER NUMBER, not id of the WordPress record. The Wordpress ID is hidden anywhere in the admin area and not known by the store manager
WordPress Environment