Can create two instances of Shopify SDK
Static is used in ShopifySDK.php. It is not reentry. Can't create two instances of ShopifySDK.
Can developers please remove static?
Thanks.
i thought yes , you can use two instance but you need to specify name space sperate for each instances
I use a parent class and have a function in it
protected function resetConfig($config) { return PHPShopify\ShopifySDK::config($config); }
Then I have extending classes that have their own private config array
In each of these extending classes, I call the function resetConfig so the Shopify object has the correct configuration before I call any of the PHPShopify functions
Using this method, I have set up 4 different instances of the Shopify object for use with different clients and shops inside my web application
Hope this might help