WooCommerce + Ionic:无法注册和结帐-无法加载Fetch API [英] WooCommerce + Ionic: Unable to signup and checkout - Fetch API cannot load
问题描述
我正在一个将WooCommerce与Ionic 3集成在一起的项目,并且在注册和结帐功能方面遇到问题。我能够从WooCommerce网站上阅读产品并登录,但是每次我执行发布请求时,都会遇到以下错误:
I am working on a project that integrates WooCommerce with Ionic 3 and I am having problems with the signup and checkout functionality. I am able to read products and login from my WooCommerce site, but every time I do a post request, I am getting these errors:
{错误:[{代码: woocommerce_api_authentication_error,消息:无效的签名-提供的签名不匹配。}]}
{"errors":[{"code":"woocommerce_api_authentication_error","message":"Invalid signature - provided signature does not match."}]}
我该如何解决?
推荐答案
确保顶部的.htaccess文件中包含以下代码。您可以在WordPress的根目录中找到此文件。
Make sure you have the following code in your .htaccess file on the top. You can find this file in the root of your WordPress.
RewriteEngine On
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^(.*)$ $l [R=200,L]
也启用CORS在您的浏览器上。
Also enable CORS on your browser.
这篇关于WooCommerce + Ionic:无法注册和结帐-无法加载Fetch API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!