pixelpeter / laravel5-woocommerce-api-client

Laravel 5 wrapper for the Woocommerce REST API
MIT License
125 stars 48 forks source link

Giving 500 after migratimg from local server to a stagging server #43

Closed jpeevi closed 5 years ago

jpeevi commented 5 years ago

Getting:

Automattic \ WooCommerce \ HttpClient \ HttpClientException (500)
Syntax error

After migrating from a local windows server to a live server running cent OS.

pixelpeter commented 5 years ago

Please make sure you're running the same Wordpress versions and that your keys are correct

jpeevi commented 5 years ago

@pixelpeter Re generated the keys and configured the same , but still the same :(

pixelpeter commented 5 years ago

Do you use services like cloudflare? Then please disable temporarily and try again.

This are the most common reasons for HttpClientException (500)

Additionally you can look at the underlying php library because laravel5-woocommerce-api-client is just a simple wrapper around this and does not add additional functionality

https://github.com/woocommerce/wc-api-php/issues?utf8=%E2%9C%93&q=HttpClientException

jpeevi commented 5 years ago

Nope no cloudfare is there any way I can print the complete URL ?

pixelpeter commented 5 years ago

Maybe this will help:

use Woocommerce;

// first send a request
Woocommerce::get('orders');

// get the request
Woocommerce::getRequest();

// get the response headers
Woocommerce::getResponse();
jpeevi commented 5 years ago

But , the first Woocommerce::get('orders'); throws the exception!

jpeevi commented 5 years ago

Seems to be an issue with WP. Reinstalled a fresh copy and migrated just the product data. Things are back to normal. Thanks!