Skip to content

Instantly share code, notes, and snippets.

@fditrapani
Created November 27, 2014 14:52
Show Gist options
  • Select an option

  • Save fditrapani/fdbf67854fcfc428d4fe to your computer and use it in GitHub Desktop.

Select an option

Save fditrapani/fdbf67854fcfc428d4fe to your computer and use it in GitHub Desktop.
// Set variables for our request
$shop = "demo-shop";
$token = "SWplI7gKAckAlF9QfAvv9yrI3grYsSkw";
$query = array(
"Content-type" => "application/json" // Tell Shopify that we're expecting a response in JSON format
);
// Run API call to get all products
$products = shopify_call($token, $shop, "/admin/products.json", array(), 'GET');
// Get response
$products = $products['response'];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment