You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
When you save an order and create a transaction afterwards (proceed the payment) you cannot grab the newly created transaction via
$order->getTransactions();
This is because you cache all transaction in $order->getTransactions() but don't invalidate the cache after creating a transaction.
Since Commerce 3.X you included the transactions as search keywords, thus $order->getTransactions() is called after saving the order -> the old transactions are cached.
To Reproduce
Save an order via PHP
Create a new transaction via Commerce::getInstance()->getPayments()->processPayment() in PHP
try to grab the transaction via $order->getTransactions() and see it does not contain the new transaction
Expected behavior
getting all transactions with the newly created one
The text was updated successfully, but these errors were encountered:
Description
When you save an order and create a transaction afterwards (proceed the payment) you cannot grab the newly created transaction via
This is because you cache all transaction in
$order->getTransactions()
but don't invalidate the cache after creating a transaction.Since Commerce 3.X you included the transactions as search keywords, thus
$order->getTransactions()
is called after saving the order -> the old transactions are cached.To Reproduce
Commerce::getInstance()->getPayments()->processPayment()
in PHP$order->getTransactions()
and see it does not contain the new transactionExpected behavior
The text was updated successfully, but these errors were encountered: