Skip to content

Product->put() issue - HTTP Code 406 #23

Closed
@KiloooNL

Description

@KiloooNL

Hi @tareqtms,
I'm trying to update an existing product with the API:

Here's the code I'm using:
$putArray = array("id" => "100000000", "title" => "titleTest", "body_html" => "description");
// Update existing product
$shopify->Product->put($putArray);

However, when I process this, I get the following error:

Fatal error: Uncaught PHPShopify\Exception\CurlException: Request failed with HTTP Code 406. in E:\xampp\htdocs\libraries\php-shopify\lib\ShopifyResource.php:485 Stack trace: #0 E:\xampp\htdocs\libraries\php-shopify\lib\ShopifyResource.php(395): PHPShopify\ShopifyResource->processResponse(NULL, 'product') #1 E:\xampp\htdocs\shopifyInventory.php(146): PHPShopify\ShopifyResource->put(Array) #2 {main} thrown in E:\xampp\htdocs\libraries\php-shopify\lib\ShopifyResource.php on line 485

I can't figure out why it is responding with 'product' being null, as the array elements seem OK and the product does exist. Any advice here?

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