slince / shopify-api-php

:rocket: Shopify API Client for PHP
MIT License
128 stars 47 forks source link

2019-10 API version will be deprecated #87

Closed vabileus closed 3 years ago

vabileus commented 3 years ago

Regarding to the https://www.shopify.com/partners/blog/whats-new?utm_source=exacttarget&utm_medium=email&utm_campaign=blog&utm_content=partner_blog-2020-09-15#API-deprecation 2019-10 API version will be deprecated and apps calling this API version will be removed. In 2.5.0 version of bundle still using 2019-10 API.

More info: https://www.shopify.com/partners/blog/api-deprecation-update-2020-10?itcat=partner_blog&itterm=whats_new_september_2020

Eduard9969 commented 3 years ago

Hello. This won't fix the API update issue, but you can specify the version when initializing the client

require __DIR__ . '/vendor/autoload.php';

$credential = new Slince\Shopify\PublicAppCredential('Access Token');
// Or Private App
$credential = new Slince\Shopify\PrivateAppCredential('API KEY', 'PASSWORD', 'SHARED SECRET');

$client = new Slince\Shopify\Client($credential, 'your-store.myshopify.com', [
    'metaCacheDir' => './tmp' // Metadata cache dir, required
    'apiVersion' => '2020-01' // API version
]);