Skip to content

Allow for -optionally - pulling metafields for Products #3

Description

@stefanospetrakis

Situation
At the moment the Client class only pulls Products and their respective fields. In case the Shopify Product has some metafields attached to it, they are not made available through the client's getProducts and getProduct methods.

Current workaround
It is still possible to retrieve the metafields through the get method.

Feature request
The Product or Products returned from getProduct or getProducts could - optionally - return Product objects that include a metafields property with the metafields data.

Technical suggestion
Since this is not a must-have for all use-cases of the Shopify client, it could be implemented as a Decorator class, so that an application needing access to the metafields of a product could simply do the following:

$client = new Shopify\PrivateApp($domain, $api_key, $password, $shared_secret));
$client = new MetafieldsClient($client);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions