Skip to content

Commit

Permalink
Updated README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
arslanramay committed Jun 5, 2024
1 parent ac5e1dc commit 1e04cdb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ In order to use this wrapper library you will need to provide credentials to acc

You will either need an access token for the shop you are trying to access (if using a [public application](https://help.shopify.com/api/getting-started/authentication#public-applications)) or an API Key and Secret for a [private application](https://help.shopify.com/api/getting-started/authentication#private-applications).

## Examples
## Code Examples

#### Make an API call
```php
Expand All @@ -36,8 +36,8 @@ $result = $shopify->call('POST', 'admin/products.json', [
"title" => "Kerastase Shampoo 150ml",
"body_html" => "<strong>Good shampoo for hair!</strong>",
"vendor" => "Kerastase",
"product_type" => "Snowboard",
"tags" => 'Shampoo, Kerastas, "Hair Care"',
"product_type" => "Shampoo",
"tags" => 'Shampoo, Kerastase, "Hair Care"',
],
]);
```
Expand Down
8 changes: 5 additions & 3 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
$dotenv->load();

// =====================================
// API Credentials
// =====================================
// Define shop domain, API key, and secret
$shop_domain = $_ENV['SHOP_DOMAIN'];
$shop_access_token = $_ENV['SHOP_ACCESS_TOKEN'];
$shop_api_version = $_ENV['SHOP_API_VERSION'];

echo "<pre>";
// var_dump($_ENV);
// var_dump($shop_access_token);

echo "<pre>";
echo "Shop Domain: " . $shop_domain . "\n";
echo "Shop Access Token: " . $shop_access_token;

echo "</pre>";


// Initialize the Shopify client
Expand Down

0 comments on commit 1e04cdb

Please sign in to comment.