Open realrecordzLab opened 4 years ago
Hi, you can check automattic\woocommerce\src\WooCommerce\HttpClient\HttpClient.php here CURLOPT_TIMEOUT set 0 so its infinite loop set
Hi, you can check automattic\woocommerce\src\WooCommerce\HttpClient\HttpClient.php here CURLOPT_TIMEOUT set 0 so its infinite loop set
How I can fix this? I've tried also with the rest api, but the auth not work, I think because I've unset the users wp api endpoint?
Same issue here on Nginx as well as Apache. Following the WooCommerce REST API Docs to the letter with $woocommere->get(''), I get
`Fatal error: Uncaught Automattic\WooCommerce\HttpClient\HttpClientException: cURL Error: Operation timed out after 2000 milliseconds with 0 bytes received in /automattic/woocommerce/src/WooCommerce/HttpClient/HttpClient.php:417 Stack trace:
`
Hi,
Same problem since yesterday. Timeout with this error :
Do you have any fix ?
Any update here ? Facing same issue
I think it's a bug of woocommerce and for now no solution is provided by automattic
Il giorno mer 15 lug 2020 alle ore 15:02 kirteeu notifications@github.com ha scritto:
Any update here ? Facing same issue [image: image] https://user-images.githubusercontent.com/67957370/87547947-744ab280-c6c9-11ea-8b5f-2b01e91cd6ca.png
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/woocommerce/wc-api-php/issues/261#issuecomment-658753551, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMKZMUWCQYVT6ED45F6KO63R3WSFXANCNFSM4KZRC7AA .
Same issue
Automattic\WooCommerce\HttpClient\HttpClientException cURL Error: Could not resolve host: domain.com
EDIT This is some issue with hosts on local machines. If wordpress site is running on local by flywheel try to enable live link, next try retrieve API - on my side works. (Remember to change url in client object to generated by flywheel xxx.ngrok.io)
I fixed this error setting the client timeout to 0. Default is 15. Does anyone know if this is a good practice?
Same here, Any solutions so far ?
tiene un error por exceso del tiempo de ejecución, tiene varias soluciones. 1.- Agregar esta linea de comando el archivo .htaccess de su pagina web: php_value max_execution_time 300 2.- Agregar esta linea al principio de su archivo .php que ejecuta la funcion que estan realizando set_time_limit(300);
Solo se debe añadir un timeout:
ejm:
$woocommerce = new Client(
$url_API_woo,
$ck_API_woo,
$cs_API_woo,
[
'wp_api' => true,
'version' => 'wc/v3',
'timeout' => 400
]
);
Solo se debe añadir un timeout:
ejm:
$woocommerce = new Client( $url_API_woo, $ck_API_woo, $cs_API_woo, [ 'wp_api' => true, 'version' => 'wc/v3', 'timeout' => 400 ] );
It's works for me
I had trouble with config:cache
, when it is run, the app Laravel 8
doesn't read files from the .env-file
. I ran config:clear
, and everything works again.
The problem with me was the All In One Wp Security, I had a 6g Firewall... after disable that, all will works again. Also, try to have a clean .htaccess with any others rules.
Hello guys,
By any chance, does anyone have a concrete solution to this error, I am still getting it even though I have tried all the suggestions mentioned above. However the error changes when applying the timeout => 400 from error on line 417 to : automattic/woocommerce/src/WooCommerce/HttpClient/HttpClient.php on line 350
I am trying to use the woocommerce API to build a plugin, and I am working on my localhost using MAMP, any idea how to get around this?
Hi,
The authentication of woocommerce rest-api is annoying and I've been getting the same error for a million times until I decided to skip the authentication step.
Just include the following code to bypass the authentication step
add_filter( 'woocommerce_rest_check_permissions', 'myfunction_allow_rest_api_queries', 10, 4 );
function myfunction_allow_rest_api_queries( $permission, $context, $zero, $object ) {
return true; // Allow all queries.
}
Thanks to the following resource https://www.damiencarbery.com/2019/07/disable-woocommerce-rest-api-authentication/
Hi everyone,
I was also having the same issue, there were about 300 to 400 products in my Yii project and needs to be exported to wordpress store. I was also facing the same error and I could fix that error by increasing timout amount in settings array like
$woocommerce = new Client(
'http://localhost/ladykent/', // Your store URL
'ck_32...', // Your consumer key
'cs_0a...', // Your consumer secret
[
'wp_api' => true, // Enable the WP REST API integration
'version' => 'wc/v3', // WooCommerce WP REST API version
'timeout'=> 40000, // it needs to be increased according to your need I increase it to 40000
'verify_ssl'=> false,
]
);
I want to use the REST API to get products and categories on the front-end of a website and make an infinite scroll. I'm havong some trouble with the php client library, I'm on localhost and I'm not able to fetch data. I get this error
If I remove the ssl verification and the timeout, after setting a custom rest route on wordpress I will get instead this error:
Is possible to fix this?