I am using a plugin named Woocommerce POS from webkul and it uses woocommerce api to interact.
When looking at the console, it shows
POST https://919kicks.com/wp-json/pos/v1/get-products 500
and the page returns:
{"code":"rest_no_route","message":"No route was found matching the URL and request method.","data":{"status":404}}
In fact, I changed the woocommerce rest api credentials a few days back and that could be the issue.
Found the issue.
The error log showed a Fatal Error.
The plugin was using operands on strings instead of int/float.
Related
I am integrating Woo-commerce API’s in my wordpress site using Woo-commerce official rest sdk. I made a link using authentication endpoint URL. When I click the link it takes the user to Woo-commerce authentication page, where user login and Approve the request.
After approving the request it should take me to return url which i mention in the link. Instead it shows me the following error.
Error: An error occurred in the request and at the time were unable to send the consumer data.
I was having the same issue as well, and in my case, the return_url on my backend server was accepting GET requests, I changed it to POST, and everything worked perfectly. I hope it helps!
I know it's late for the answer but writing it for the people who will face the same issue in the future.
I was having the same issue and my problem was that the callback_url was wrong which was creating the error internally. So if you are getting this error, most probably your callback_url is not correct, please check that properly.
For whoever Shattique's answer
did not work,
check the response status code sent by the callback_url handler.
Anything other than 200 will throw the error in OP's question.
Here is link to woocommerce github repo,
where it throws the error.
TLDR: Make sure callback_url handler returns statusCode: 200
I am integrating payfort in wooCommerce site, I have installed the payfort plugin, and configured according to my payfort test account settings.
Now on checkout its showing error
There are some issues with the items in your cart. Please go back to the cart page and resolve these issues before checking out.
I tried to check order history on wooCommerce which showing transaction status pending, then I checked on payfort test account logs, and I found the response for this transaction was sent with response_message 3d secure check requested.
Now I wonder how to handle payfort response on wooCommerce side while integration type is MerchantPage 2.0, which I am expecting to handle the response itself.
I need little help to understand the payfort integration process, as my search couldn't find any help online.
Thanks in advance
I have emailed Payfort support center, but as its weekend, the response will be late.
The issue resolved finally, let me share the solution.
Issue:
In this plugin payment.php file has a function callApi($postData, $gatewayUrl) which is sending request to payfort to notify and parsing response to json
$array_result = json_decode($response, true);
while the response was coming in XML format so it was returning null to $array_result.
Solution:
To resolve the above issue in Payfort account settings, under Account Setup > Technical Settings enable
Json for response type.
Suggestion:
Plugin should be updated to configured with this settings as well, if an account settings is with XML response type, then response should be parse accordingly.
I'm a beginner of AMP from Japan.
Now I'm in trouble dealing with a error that is output when I introduce AMP into my WordPress webpage.
I cloud activate the AMP plugin and display an AMP of the post page without problem.
But the following error was output on my browser console when I added #development=1 to the end of URL of the post AMP to confirm whether the post AMP was configured as a valid AMP on Google.
Failed to load resource: the server responded with a status of 404 ()
https://cdn.ampproject.org/v0/validator_minified.js.sourcemap
Then I accessed to the above URL described in the error message, the following error page was displayed.
Google
404. That’s an error.
The requested URL /v0/validator_minified.js.sourcemap was not found on this server. That’s all we know.
I guess the output post AMP may not be recognized by Google as a structure of AMP if this error page was displayed.
But I have no idea to resolve the 404 error and can't progress any more.
In other words, I'd like to know some solution and hints to resolve the 404 error in order that Google recognizes my post AMP.
If you have some solution or hints, I'd be very helpful if you provide them for me.
Thanks in advance.
clear your cache in the server and delete your log. Blocking an malicious IP trafics and your see the IP in 30 per connection then you want blocked the IP.
Using proxy or like mitigation
I am using WP REST API in my wordpress blog. I am getting all the post using this link and it works fine. http://www.gmonetix.com/blog/wp-json/wp/v2/posts
But when I want to get a particular post by id such as http://www.gmonetix.com/blog/wp-json/wp/v2/posts/1122 , it shows 403: Error - access to the resource in this server is denied. Please give a solution for it.
You can retrieve single post by id like, this should work,
http://demo.wp-api.org/wp-json/wp/v2/posts/?filter[p]=1122
This URL gives response,
http://www.gmonetix.com/blog/wp-json/wp/v2/posts/?filter[p]=1122
I had the same issue. You can try disabling mod_security on your server or making an exception for mod_security for the REST endpoints. Also you can try WordPress on your local server and confirm issue.
I need to fetch taxes from the WooCommerce REST API using PHP. I am using API version 2.
This is the function that I tried :
$client->taxes->get(null, array( 'filter[limit]'=>100000 ))
But it is not getting any result. It is giving this error :
"No route was found matching the URL and request method
[woocommerce_api_no_route] 404"
Tried everything and searched everywhere but could find any solution.
An example is given in the API documentation like this only but I could not find out the related PHP code.
How can I solve this issue?
Thanks