phpclassic / php-shopify

PHP SDK for Shopify API
Apache License 2.0
568 stars 211 forks source link

Proper syntax to add a liquid snippet? #231

Open phpcontrols opened 3 years ago

phpcontrols commented 3 years ago

I tried adding a snippet like this using Asset API

$snippet = ["asset['key']" => "snippets/newsnippet.liquid", "value" => "hello"];
$shopify->Theme($themeId)->Asset->put($snippet);

It doesn't seem to work. Returns 406.

I think the syntax have some issues but I can't figure out the correct format.