Closed jeroendelau closed 1 year ago
Does your app have scope permissions for:
write_assigned_fulfillment_orders, read_assigned_fulfillment_orders. read_fulfillments, write_fulfillments
?
I'm having the same issue and am not following you on your fix. Can you clue me in a little?
Thanks.
Update, I do have scope permissions as noted above.
No, I only request: write_fulfillments (and a bunch of others, but not fulfillments)
Fairly confident that I would receive a 403 if the scope was invalid, not a 404 that returned now. The SDK is trying to call a route that doesn't exists in api version 2022-07.
IMHO - this is a breaking change and should have been released as minor version release. 1.1.x - release another minor release reverting to 2022-01 1.2.x - bump the shopify api version to 2022-07
@JoeKuhns I updated composer.json to fix the library to 1.1.22, the last one that uses api version 2022-01
// in composer.json update
...
"phpclassic/php-shopify": "1.1.22",
...
// run
composer update phpclassic/php-shopify
@jeroendelau Excellent thanks! how did I not know composer would downgrade? Works perfectly.
@jeroendelau
I have fixed the releases as you suggested.
However, For everyone's info, it's best to use a self-defined API Version in the $config
array. Like this:
$config = array(
'ShopUrl' => 'yourshop.myshopify.com',
'AccessToken' => '***ACCESS-TOKEN-FOR-THIRD-PARTY-APP***',
'ApiVersion' => '2022-07',
);
This will give you better control over the API Versions. Anyhow you will need to keep updating the API Version, because versions will reach EOL after some time.
@tareqtms, many thanks!
I'll start work somewhere next week to help fix the fulfillment for the 2022-07 version.
Is there any news for the fix on the fulfillment for 2022-07 version? Is someone working on it coming with a solution in few time?
A couple pieces of news from Shopify. Apps will have until 2023-07 release to migrate to the new version.
In version 1.1.23 the Shopify version was updated from 2022-01 to 2022-07. There are some breaking changes between these versions.
This now results in 404 NOT found:
$client->Order($order->Order_ID)->Fulfillment->post($body);
Instead now you will have to send to a different location, with an entirely different payload. admin/api/2022-07/fulfillments.json
I believe what would be needed is
$client->Fulfillments
And remove
$client->Order($order->Order_ID)->Fulfillment
For others with the same problem, I have fixed my version to 1.1.22