You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$productId = "11235813213455"
// `session` is built as part of the OAuth process
$client = newShopify\Clients\Rest(
$session->getShop(),
$session->getAccessToken()
);
// GIVES ERROR$response = $client->get({
path: "products/$productId",
query: ["id" => 1, "title" => "title"]
});
Expected behavior
What do you think should happen?
The above code example provided by Shopify Docs should work
The Shopify documentation is unfortunately not very helpful. This example that they provide has syntax errors. Here's how it's supposed to be written:
$productId = "11235813213455";
// `session` is built as part of the OAuth process$client = newShopify\Clients\Rest(
$session->getShop(),
$session->getAccessToken()
);
// not using braces{} when using $client->get()$response = $client->get(
path: "products/$productId",
query: ["id" => 1, "title" => "title"]
);
We are closing this issue because it has been inactive for a few months.
This probably means that it is not reproducible or it has been fixed in a newer version.
If it’s an enhancement and hasn’t been taken on since it was submitted, then it seems other issues have taken priority.
If you still encounter this issue with the latest stable version, please reopen using the issue template. You can also contribute directly by submitting a pull request– see the CONTRIBUTING.md file for guidelines
Issue summary
Write a short description of the issue here ↓
I am using the PHP Example from here https://shopify.dev/docs/api/admin-rest#endpoints
Expected behavior
What do you think should happen?
The above code example provided by Shopify Docs should work
Actual behavior
What actually happens?
The text was updated successfully, but these errors were encountered: