Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Woocommerce REST API 404 error

Since woocommerce released the 2.1 version with REST API feature, I tried to use it: I activated the API on my woocommerce admin panel but when I try to call the curl: http://www.mydomain.com/wc-api/v1/

the response is a 404 file not found error.

I tried to check everything in internet, I've read woocommerce docs but I cannot figure out what I have to do: probably some setting in the server apache or php... I don't know..

Thank you

like image 965
user1142705 Avatar asked Mar 28 '14 10:03

user1142705


2 Answers

Try going, on the Admin Panel, to Settings -> Permalinks. On Default Settings radio group, select the "Post name" one. Save the changes.

Worked for me; hope for you too. :)

Source: this blog post.

EDIT: Website is not available, so I put its Wayback Machine URL.

like image 62
devrique Avatar answered Sep 18 '22 13:09

devrique


It was simply a matter of enabling URL rewriting in WordPress. Basically, go to Settings -> Permalinks and make sure the first rewriting option is set to Posts Name.

like image 36
ahmedkandil Avatar answered Sep 21 '22 13:09

ahmedkandil