• We are using the get_collections() function to return collections on the fly. This is mainly to get metafield data via the API for each collection

    Documentation: https://docs.wpshop.io/php-functions#get_collections

    The issue we’re having is that the schema parameter does not get passed through to the GraphQL query that ShopWP makes to Shopify.

    When get_connections gets called in the Collections class it makes a call to:

    $result = $this->Storefront_Collections->api_get_collections($final_params, false, $with_products, $query_params_products);

    As you can see, the second parameter is set to false. This means that the schema never gets to the final GraphQL layer Instead it uses the default collection_schema in the Queries class.

    Can you please update theget_collections object to pass through the custom_schema to the subsequent functions so we can return the data we need from collections.

    Cheers,
    Nathan

Viewing 1 replies (of 1 total)
  • Plugin Author andrewmrobbins

    (@andrewmrobbins)

    Hey Nathan,

    I’ll work on getting this updated for you over the weekend. Thanks for the detailed post.

Viewing 1 replies (of 1 total)
  • The topic ‘PHP Render Functions – get_collections() – schema not being passed through’ is closed to new replies.