happyday25
Forum Replies Created
-
Forum: Plugins
In reply to: [Advanced Shipment Tracking for WooCommerce] Compatibility with ShippoHi @zorem, this endpoint returns a 401 error also.
Forum: Plugins
In reply to: [Advanced Shipment Tracking for WooCommerce] Compatibility with ShippoHi @zorem, I got in touch with my hosting provider and it doesn’t sound like anything is being blocked on that end. After testing a bit more, if I use the endpoint https://<MYDOMAIN.COM>/wp-json/wc/v1/, this returns data. If I use the endpoint https://<MYDOMAIN.COM>/wp-json/wc/v1/orders, this returns the 401 error. This makes sense because this is private data which couldn’t be accessed without the REST API consumer key and secret. The data populates if I use the endpoint https://<MYDOMAIN.COM>/wp-json/wc/v2/orders?consumer_key=XXXX&consumer_secret=XXXX. If I use https://<MYDOMAIN.COM>/wp-json/wc/v1/orders/shipment-trackings, I get a 404 error. Given all of this, it seems like either the endpoint for the AST plugin is incorrect or the AST plugin isn’t grabbing the REST API consumer ID and secret. Thoughts?
Forum: Plugins
In reply to: [Advanced Shipment Tracking for WooCommerce] Compatibility with ShippoHi @zorem, if by the API call you mean https://<MYDOMAIN.COM>/wp-json/wc/v1/orders/shipment-trackings, this is the exact call I am using and what is referenced on the AST plugin documentation: https://www.zorem.com/docs/woocommerce-advanced-shipment-tracking/rest-api-support/.
When testing in my browser and after replacing <MYDOMAIN.COM> with my actual domain, I receive this error:
{“code”:”rest_no_route”,”message”:”No route was found matching the URL and request method”,”data”:{“status”:404}}
If I take off “shipment-trackings” at the end of the call and use https://<MYDOMAIN.COM>/wp-json/wc/v1/orders, I receive this error:
{“code”:”woocommerce_rest_cannot_view”,”message”:”Sorry, you cannot list resources.”,”data”:{“status”:401}}
If I use the call https://<MYDOMAIN.COM>/wp-json/wc/v1/orders/<order-id>/shipment-trackings and replace <MYDOMAIN.COM> with my actual domain and <order-id> with an actual order number, I receive this error:
{“code”:”woocommerce_rest_cannot_view”,”message”:”Sorry, you cannot list resources.”,”data”:{“status”:401}}
When setting up Shippo, a REST API is set up automatically in WooCommerce. I have tested it via the Shippo documentation and it is responding properly:
https://support.goshippo.com/hc/en-us/articles/360024612052I also created a new REST API via the documentation provided on WooCommerce:
https://docs.woocommerce.com/document/woocommerce-rest-api/I tested the new API using the WooCommerce testing documentation:
https://github.com/woocommerce/woocommerce/wiki/Getting-started-with-the-REST-API
Testing came back with this error:{“code”:”woocommerce_rest_cannot_view”,”message”:”Sorry, you cannot list resources.”,”data”:{“status”:401}}
After disabling all security plugins, JavaScript optimization plugins, and removing all code from the .htaccess file, I still receive the errors listed above.
The only other thing I can think of would be that there is still some additional code that I need to place somewhere on my site such as the “POST /wp-json/wc/v1/orders/<order_id>/shipment-trackings” code listing in the AST documentation. If I do need to add this to the site somewhere, where do I add it?
Do I also need to change the meta fields of the AST plugin to match Shippo’s? If so, where in the AST plugin code do I make these changes?
When creating the REST APIs, I am given a Consumer Key and a Secret Key. Do these need to be added in the AST plugin code somwhere? If so, where?
Do you have other ideas where the problem might be?
Thank you.
Forum: Plugins
In reply to: [Advanced Shipment Tracking for WooCommerce] Compatibility with ShippoHi @zorem, any thoughts on my last note? I have been searching all over for possible solutions without much luck. Thank you.
Forum: Plugins
In reply to: [Advanced Shipment Tracking for WooCommerce] Compatibility with ShippoThank you @zorem. If I understand correctly then, everything on the AST plugin side should be ready to go. The REST API is in place and I have setup webhooks on the Shippo side that point to https://<MYDOMAIN.COM>/wp-json/wc/v1/orders/shipment-trackings. When attempting to POST a test payload however, I am receiving a 404 Not Found error on Shippo. I have contacted Shippo about this and they said everything looks configured properly on their end. What am I still missing? Thank you.
- This reply was modified 4 years, 11 months ago by happyday25.
Forum: Plugins
In reply to: [Advanced Shipment Tracking for WooCommerce] Compatibility with ShippoShippo automatically creates a REST API when linking to WordPress. Will this be the same API that is used to communicate with the AST plugin or do I need to create a separate one?
Where do I go to modify the Shipment Tracking Properties (meta fields) in the AST plugin to match those in Shippo?
Forum: Plugins
In reply to: [Advanced Shipment Tracking for WooCommerce] Compatibility with ShippoHi @zorem, where do I put the Endpoint code in my WordPress site? Does it go in the functions.php file? Thanks!
Forum: Plugins
In reply to: [Advanced Shipment Tracking for WooCommerce] Compatibility with Shippo@zorem, ok thank you for the information. I will contact Shippo again and see if they can offer any help with their webhooks.
Forum: Plugins
In reply to: [Advanced Shipment Tracking for WooCommerce] Compatibility with ShippoThank you @zorem. Would you be able to provide me with an example or template of how the shippo webhooks and REST API Support for the advanced shipment tracking should be combined? My knowledge of webhooks, post requests, endpoints, etc. is pretty limited and my level of experience consists of making minor edits to code in my wordpress functions.php.
Forum: Plugins
In reply to: [Advanced Shipment Tracking for WooCommerce] Compatibility with ShippoThank you @zorem, I found these webhooks in Shippo’s documentation. Would any of these work for the code you provided? I don’t know much about programming.
https://goshippo.com/docs/webhooks/
https://gist.github.com/simonkreuz/7d3f232bb66292fd8c248c5ec477fa83