Skip to content

Commit

Permalink
Merge pull request #305 from whobutsb/feature/add-location-metafields
Browse files Browse the repository at this point in the history
Add the Metafield to the Location Resource
  • Loading branch information
tareqtms authored Sep 15, 2023
2 parents ac59e48 + b9a35f8 commit 809aed5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ Some resources are available directly, some resources are only available through
- [InventoryLevel](https://help.shopify.com/api/reference/inventorylevel)
- [Location](https://help.shopify.com/api/reference/location/) _(read only)_
- Location -> [InventoryLevel](https://help.shopify.com/api/reference/inventorylevel)
- Location -> [Metafield](https://help.shopify.com/api/reference/metafield)
- [Metafield](https://help.shopify.com/api/reference/metafield)
- [Multipass](https://help.shopify.com/api/reference/multipass) _(Shopify Plus Only, API not available yet)_
- [Order](https://help.shopify.com/api/reference/order)
Expand Down
11 changes: 10 additions & 1 deletion lib/Location.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@

namespace PHPShopify;

/**
* --------------------------------------------------------------------------
* Location -> Child Resources
* --------------------------------------------------------------------------
* @property-read Metafield $Metafield
*
* @method Metafield Metafield(integer $id = null)
*/

class Location extends ShopifyResource
{
Expand All @@ -32,5 +40,6 @@ class Location extends ShopifyResource
*/
protected $childResource = array(
'InventoryLevel',
'Metafield',
);
}
}

0 comments on commit 809aed5

Please sign in to comment.