php-shopify icon indicating copy to clipboard operation
php-shopify copied to clipboard

Proper syntax to add a liquid snippet?

Open phpcontrols opened this issue 4 years ago • 0 comments

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.

phpcontrols avatar Jul 02 '21 21:07 phpcontrols