I’m working on WooCommerce API, but I have problem with request.
Sometimes the API request return 404 or redirect to “my-account”.
API request example :
https://example.com/index.php/wc-api/v3/products?consumer_key=ck_XXXXXXXXX&consumer_secret=cs_XXXXXXXXX`.
Pretty links are enabled.
Here is my .htacess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Any ideas ?
Please download SDK from here: https://packagist.org/packages/automattic/woocommerce
and take guidance from here: https://woothemes.github.io/woocommerce-rest-api-docs/.
And create api credential form wordpress admin end woocommerce>settings>add new key