Open
Description
Shopify Api reference
Create a new product variant
POST /admin/products/#{product_id}/variants.json
{
"variant": {
"option1": "Yellow",
"price": "1.00"
}
}
With this PHP Code:
$newVariant = array(
"option1" => "black",
"price" => "20.00"
);
$shopify->Product($product_id)->Variant->post($newVariant);
I recive this error:
Fatal error: Uncaught PHPShopify\Exception\CurlException: Request failed with HTTP Code 406.