I am not able to get presentment prices from the return send by webhook for event product/create.
I mean if I am creating a webhook for event product/create then on creating a product from admin I am getting all other data related to product and variant but I am not getting presentment prices of variants.
On the other hand while using REST API to retrieve the same product I am able to get presentment prices of variants of that product by adding header 'X-Shopify-Api-Features': 'include-presentment-prices' in curl.
But I am not understanding that how to add 'X-Shopify-Api-Features': 'include-presentment-prices' while working with webhook. In the PHP file in which I am trying to get result I have added following code to get webhook result.
<?php $webhookContent = ""; $fp = fopen('php://input', 'rb', false, $context); $response = @stream_get_contents($fp); ?>
But it is not giving me presentment prices of variants.
Please help me in getting it.
Right now it's expected that product webhooks will fire with just the shop currency included. Since presentment prices can fluctuate, it's recommend to make a separate GET call to the product to retrieve the current presentment prices when you need them.
JB | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution