Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie

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!

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
mar 25
630
0
mar 22
46
1
lis 24
2259
0
lis 23
299
1
sie 25
280