Skip to Content
Menú
This question has been flagged

I have a Webhook in place to capture product details such as standard_cost, triggered on product update. However, it seems to be firing before the product record is fully updated in the database.

For example, when a purchase order completes with around 200 products, the Webhook triggers during the update process of the product.product model. My function is then called and fetches the standard_cost, but it gets the previous value, not the updated one.

It seems the database hasn't committed the update yet when the Webhook fires.

Is the only solution here to delay my fetch logic slightly when the Webhook hits my function? Or is there a more reliable way to ensure I'm getting the updated value?

Thanks in advance!

Avatar
Descartar
Related Posts Respostes Vistes Activitat
0
de març 25
601
0
de març 22
46
1
de nov. 24
2211
0
de nov. 23
299
0
d’ag. 25
116