Skip to content

ERR_CONNECTION_RESET when trying to get products #3

@ghost

Description

Hi,
I am trying to get all products but the request is aborted and I get a ERR_CONNECTION_RESET in Chrome.
Im using a very simple code and requests to "orders" are working.

use Automattic\WooCommerce\Client;
use Automattic\WooCommerce\HttpClient\HttpClientException;
try{
    $api = new Client(API_URL, API_KEY, API_SECRET);
    echo "<pre>", print_r($api), "</pre>";
    echo "<pre>", print_r($api->get('products')), "</pre>"; //Produces error
}
catch( Exception $e ){
    echo $e->getMessage();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions