Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 809aed5

Browse files
Merge pull request #305 from whobutsb/feature/add-location-metafields
Add the Metafield to the Location Resource
2 parents ac59e48 + b9a35f8 commit 809aed5

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

‎README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,7 @@ Some resources are available directly, some resources are only available through
362362
- [InventoryLevel](https://help.shopify.com/api/reference/inventorylevel)
363363
- [Location](https://help.shopify.com/api/reference/location/) _(read only)_
364364
- Location -> [InventoryLevel](https://help.shopify.com/api/reference/inventorylevel)
365+
- Location -> [Metafield](https://help.shopify.com/api/reference/metafield)
365366
- [Metafield](https://help.shopify.com/api/reference/metafield)
366367
- [Multipass](https://help.shopify.com/api/reference/multipass) _(Shopify Plus Only, API not available yet)_
367368
- [Order](https://help.shopify.com/api/reference/order)

‎lib/Location.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@
99

1010
namespace PHPShopify;
1111

12+
/**
13+
* --------------------------------------------------------------------------
14+
* Location -> Child Resources
15+
* --------------------------------------------------------------------------
16+
* @property-read Metafield $Metafield
17+
*
18+
* @method Metafield Metafield(integer $id = null)
19+
*/
1220

1321
class Location extends ShopifyResource
1422
{
@@ -32,5 +40,6 @@ class Location extends ShopifyResource
3240
*/
3341
protected $childResource = array(
3442
'InventoryLevel',
43+
'Metafield',
3544
);
36-
}
45+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /