Skip to content

Instantly share code, notes, and snippets.

@bka
Created June 18, 2016 10:46
Show Gist options
  • Save bka/6018b488f488ef924b7b807872fa50b2 to your computer and use it in GitHub Desktop.
Save bka/6018b488f488ef924b7b807872fa50b2 to your computer and use it in GitHub Desktop.
echo update_product("http://magento2.local/index.php/rest/V1/products/test");
// following option CURLOPT_PUT breaks magento with
// {"message":"%fieldName is a required field.","parameters":{"fieldName":"product"},
curl_setopt($ch, CURLOPT_PUT, 1 );
// use CURLOPT_CUSTOMREQUEST instead
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment