Topics covering webhook creation & management, event handling, Pub/Sub, and Eventbridge, in Shopify apps.
Hello Team,
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.
Thank you
Hey @DeveloperRK,
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 | Solutions Engineer @ Shopify
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Yes It is a work around we are using right now. And it is consuming one extra call. But we have to provide the support of presentment_price in product webhook. So till when we can expect an update on it.?