woocommerce-external-product-embed icon indicating copy to clipboard operation
woocommerce-external-product-embed copied to clipboard

API Connection Error. Check the Store URL and ensure the REST API is enabled on the external site.

Open Morne004 opened this issue 3 years ago • 3 comments

Please help. Everything worked fine with this plugin until we updated SSL cert on the remote site where the products are being pulled from.

I have generated new API Key & Secret, but when I save I get this error: "API Connection Error. Check the Store URL and ensure the REST API is enabled on the external site."

I can however access _https://mydomain.co.za/wp-json/ with a normal get request via POSTMAN using the same API Key and Secret.

Any help would be greatly appreciated!

Morne004 avatar Jun 23 '21 08:06 Morne004

Please help. Everything worked fine with this plugin until we updated SSL cert on the remote site where the products are being pulled from.

I have generated new API Key & Secret, but when I save I get this error: "API Connection Error. Check the Store URL and ensure the REST API is enabled on the external site."

I can however access _https://mydomain.co.za/wp-json/ with a normal get request via POSTMAN using the same API Key and Secret.

Any help would be greatly appreciated!

Hi did you manage to get this problem resolved? We have a similar situation

jiggycreationz avatar Dec 21 '21 22:12 jiggycreationz

Unfortunately not yet.

Morne004 avatar Dec 23 '21 06:12 Morne004

Sorry, I unfortunately don't have time to work on this right now. But can drop some quick advice:

  • The plugin uses this package for the REST API calls: https://packagist.org/packages/automattic/woocommerce. Seen in the composer.json in this repo, it a bit outdated so could try to update it.

  • Here is where the plugin sets up that client: https://github.com/WPprodigy/woocommerce-external-product-embed/blob/master/classes/class-wcepe-api-client.php#L28-L38. You'll see it uses the wc/v2 rest version, maybe it's deprecated or needs to be increased.

  • Perhaps try passing verify_ssl client option set to true. It says it is the default in the docs, but maybe not for the version currently running here.

  • There is another GH issue where users passed query_string_auth client option and it worked for them, but make sure it's secure.

WPprodigy avatar Dec 23 '21 17:12 WPprodigy