phpclassic / php-shopify

PHP SDK for Shopify API
Apache License 2.0
568 stars 211 forks source link

Use Separate Config for Each Instance of ShopifySDK #329

Open jaywilliams opened 1 month ago

jaywilliams commented 1 month ago

This pull-request includes the code changes by @n3o77 to change the ShopifySDK config from a single, shared static config to local for each instance.

This allows you to configure multiple Shopify store connections, all within the same PHP script.

This pull-request resolves the following issues: https://github.com/phpclassic/php-shopify/issues/61, https://github.com/phpclassic/php-shopify/issues/226

n3o77 commented 1 month ago

Hi, suprised you found those changes ;)

Please keep in mind that i never wrote / updated tests nor did i test everything in the library to see if anything breaks. IIRC i knew that it could make problems with the curl config or something request related, not sure anymore. Which is why i never opened a PR as i didn't have the time to make sure that it won't affect anything else.

But it solved every problem i had and so it was good enough for for that project, which still runs in production with those changes.