Skip to content

Commit

Permalink
Specify status any on upsert query
Browse files Browse the repository at this point in the history
  • Loading branch information
dpanta94 committed Jan 10, 2025
1 parent 5caf507 commit 41ac0b6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Tickets/Commerce/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -664,8 +664,13 @@ public function upsert( Gateway_Interface $gateway, array $args ) {
$update_args = apply_filters( 'tec_tickets_commerce_order_update_args', $update_args, $gateway );

$updated = tec_tc_orders()
->where( 'id', $existing_order_id )
->where( self::ORDER_LOCK_KEY, $this->get_lock_id() )
->by_args(
[
'id' => $existing_order_id,
'status' => 'any',
self::ORDER_LOCK_KEY => $this->get_lock_id(),
]
)
->set_args( $update_args )
->save();

Expand Down

0 comments on commit 41ac0b6

Please sign in to comment.