Skip to content

How to create multiple shopify objects to access multiple stores #61

Open
@vuivenao

Description

@vuivenao

Hi everybody,
I want to update data to my two Shopify stores. But if I changed a config of Shopify SDK, it's not working. Object 1 of store 1 is same to Object 2 of store 2.

Here 's my code:

PHPShopify\ShopifySDK::config($config_store_1);
$shopify_1 = new PHPShopify\ShopifySDK;

PHPShopify\ShopifySDK::config($config_store_2);
$shopify_2 = new PHPShopify\ShopifySDK;
    
$locations_1 = $shopify_1->Location->get();
echo json_encode($locations_1)."<br/><br/><br/>==========================<br/><br/><br/>";

$locations_2 = $shopify_2->Location->get();
echo json_encode($locations_2);

===> $locations_1 is same to $locations_2

Please help me. Thanks!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions