Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $api = ShopifyApp::api();
- // Define the query.
- $query =
- '{
- shop
- {
- products(first: 1)
- {
- totalCount
- }
- }
- }';
- $response = $api->graph(GraphqlEnum::ADMIN_API, new GraphqlValue($query));
- // Total count of products.
- $totalCount = $response['data']['shop']['products']['totalCount'];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement