Loading src/Shopify/ShopifyApp.php +1 −1 Original line number Diff line number Diff line Loading @@ -104,7 +104,7 @@ class ShopifyApp public $config = []; public $defaultApiVersion = '2020-07'; public $defaultApiVersion = '2022-10'; /** * ShopifyApp constructor. Loading src/Shopify/lib/AbstractShopify.php +11 −4 Original line number Diff line number Diff line Loading @@ -64,12 +64,19 @@ abstract class AbstractShopify $this->pluralizeKey = $this->pluralizeKey ?: $this->resourceKey . 's'; $this->resourceUrl = ($parentResourceUrl ? "$parentResourceUrl/" : $config['api_url']) . $this->pluralizeKey . ($this->id ? "/{$this->id}" : ''); $this->httpRequestJson = make(CurlHttpRequestJson::class); if($config['is_private_app'] == 1) { if(!isset($config['access_token'])) { throw new Exception("请设置access_token值"); } $this->httpHeaders['X-Shopify-Access-Token'] = $config['access_token']; }else{ if (isset($config['api_password'])) { $this->httpHeaders['X-Shopify-Access-Token'] = $config['api_password']; } elseif (!isset($config['api_password'])) { throw new Exception("请设置api_password值"); } } } /** * 调用子集资源 Loading Loading
src/Shopify/ShopifyApp.php +1 −1 Original line number Diff line number Diff line Loading @@ -104,7 +104,7 @@ class ShopifyApp public $config = []; public $defaultApiVersion = '2020-07'; public $defaultApiVersion = '2022-10'; /** * ShopifyApp constructor. Loading
src/Shopify/lib/AbstractShopify.php +11 −4 Original line number Diff line number Diff line Loading @@ -64,12 +64,19 @@ abstract class AbstractShopify $this->pluralizeKey = $this->pluralizeKey ?: $this->resourceKey . 's'; $this->resourceUrl = ($parentResourceUrl ? "$parentResourceUrl/" : $config['api_url']) . $this->pluralizeKey . ($this->id ? "/{$this->id}" : ''); $this->httpRequestJson = make(CurlHttpRequestJson::class); if($config['is_private_app'] == 1) { if(!isset($config['access_token'])) { throw new Exception("请设置access_token值"); } $this->httpHeaders['X-Shopify-Access-Token'] = $config['access_token']; }else{ if (isset($config['api_password'])) { $this->httpHeaders['X-Shopify-Access-Token'] = $config['api_password']; } elseif (!isset($config['api_password'])) { throw new Exception("请设置api_password值"); } } } /** * 调用子集资源 Loading