İçereği Atla
Menü
Bu soru işaretlendi

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
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
0
Mar 25
643
0
Mar 22
46
1
Kas 24
2294
0
Kas 23
299
1
Ağu 25
335