Issue Summary
Attempting to use the WooCommerce REST API within a custom WP theme, internally to create and manage products. When trying to make a request, running into multiple issues.
Troubleshooting Questions
Using Local by Flywheel as my environment, I have followed the instructions here to get set up and running with the WC API: https://woocommerce.github.io/woocommerce-rest-api-docs/#authentication
Issues I am running into, when trying different things:
-
When on HTTPS, it throws the error of self signed certificate. I have tried everything online, setting the verify_ssl to false, using both the Automatic vendor plugin or just making a simple PHP cURL request
-
The request works in POSTman, and when I export the cURL PHP code verbatim, add it into the theme, when this block of code gets hit, there is some sort of data leak, or the process gets hung up. When I am debugging using breakpoints, it gets hung up
-
I have tried disabling ALL plugins, except WooCommerce, and issue persists.
-
WC REST API requests gets hung up and throws a timeout error, even when the timeout is set to 0, or a high number of 400
-
Are you able to create a new, plain WordPress site in Local and access it in a Browser?
Yes
Describe the steps that others can take to replicate this issue. If you have screenshots that can help clarify what is happening, please include them!
- Install WooCommerce plugin
- Make a cURL request to get all products via the WC REST API within a custom theme
System Details
-
Which version of Local is being used?
5.10.4 -
What Operating System (OS) and OS version is being used?
MAC OS 10.15.7 -
Attach the Local Log. See this Community Forum post for instructions on how to do so:
No recent logs found