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

Feature: SSL authentication endpoint

Open WPprodigy opened this issue 9 years ago • 10 comments

There are quite possibly some issues when the WooCommerce site is on https.

Need to test having a site home url in "https" format, as well as triggering this option: https://github.com/WPprodigy/woocommerce-external-product-embed/blob/master/classes/class-woocommerce-external-product-embed-transients.php#L56

WPprodigy avatar Aug 29 '15 17:08 WPprodigy

Did you get it tested?

BurlesonBrad avatar Nov 22 '15 16:11 BurlesonBrad

Seems to work w/ SSL as is. But there are some enhancements that could be added, namely the new authentication endpoint: https://woocommerce.wordpress.com/2015/08/07/api-settings-and-the-api-authentication-endpoint-in-2-4/

This only works with ssl though, so I'm not sure how profitable it would be.

WPprodigy avatar Apr 24 '16 17:04 WPprodigy

Same problem, I can't use API keys in SSL.

ghost avatar Jul 20 '17 16:07 ghost

Same problem.

fikrimastor avatar Oct 15 '17 10:10 fikrimastor

Same problem (I think). With SSL enabled on the external site (using Really Simple SSL), I receiving "API Connection Error" when entering api credentials and saving.

If I disable Really Simple SSL, everything works as expected.

Very bummed. Don't all woocommerce sites use SSL?

EDIT:

In classes/class-wcepe-api-client.php, I added a single line ('query_string_auth' => true) to the WCEPE_API_Client class and it appears to be working:

private function connect() { $settings = get_option( 'wcepe_settings' ); $options = [ 'wp_api' => true, 'version' => 'wc/v2', 'query_string_auth' => true ];

Found this possible solution here (second to last post):

Source for Fix

bryandoe avatar Feb 23 '18 11:02 bryandoe

'query_string_auth' => true Works for me as well.

rhortal avatar Mar 06 '18 16:03 rhortal

Thanks for the feedback. Looks like I do need to do some more testing for SSL. Will likely just check for the presence of SSL, and then add that portion to the auth automatically.

WPprodigy avatar Mar 06 '18 17:03 WPprodigy

ver wp 4.9.4 woocommerce 3.3.3 all keys are correct. I created the keys with admin account with read/write. installed the plugin on external site with the keys but dont see any products.

when i go to https://mydomain.com/wp-json/wc/v1/orders i get this error {"code": "woocommerce_rest_cannot_view", "message": "You can not display data sources.", "data": {"status": 401}}

whitetornado avatar Mar 08 '18 20:03 whitetornado

'query_string_auth' => true

Thanks. I spent hours for this issue and finally this helped me as well.

ouka1102 avatar Jun 02 '18 15:06 ouka1102

The 'query_string_auth' => true trick is working for me when I embed products from another domain, but not when I try to get the products from a shop on a multisite network installation... :( Any thoughts what might be going wrong there?

With regards to the SSL topic, perhaps an upgrade to the API v3 will do the trick (as well).

Would love to see an updated version of this awesome plugin anytime soon to keep it up to date with the newer versions of the API, WooCommerce, and WordPress.

stgoos avatar Aug 04 '20 19:08 stgoos