Answer the question
In order to leave comments, you need to log in
Why does it give an error: Operation timed out on POST request?
There is a similar code:
require __DIR__ . '/vendor/autoload.php';
use Automattic\WooCommerce\Client;
$woocommerce = new Client(
'https://example.com',
'ck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
'cs_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
[
'version' => 'wc/v3',
'query_string_auth' => true
]
);
$result = $woocommerce->post('products', [ 'name' => 'Woo Single' ]);
print_r($result);
$result = $woocommerce->get('products');
print_r($result);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question