Skip to content

Commit 7d90529

Browse files
committed
Restore original position of set_fraud_meta_box_type_for_order after update_order_status
The previous commit incorrectly moved set_fraud_meta_box_type_for_order before update_order_status. Only set_pos_payment_context_for_order needs to be called before the status change (so POS context is available during status transition hooks). The fraud meta box type should remain in its original position after the status change.
1 parent b83bdb2 commit 7d90529

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

includes/class-wc-payments-order-service.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,8 +470,8 @@ public function mark_terminal_payment_completed( $order, $intent_id, $intent_sta
470470
$order_status = apply_filters( 'wcpay_terminal_payment_completed_order_status', Order_Status::COMPLETED );
471471

472472
$this->set_pos_payment_context_for_order( $order, 'card_reader' );
473-
$this->set_fraud_meta_box_type_for_order( $order, Fraud_Meta_Box_Type::TERMINAL_PAYMENT );
474473
$this->update_order_status( $order, $order_status, $intent_id );
474+
$this->set_fraud_meta_box_type_for_order( $order, Fraud_Meta_Box_Type::TERMINAL_PAYMENT );
475475
$this->complete_order_processing( $order, $intent_status );
476476
}
477477

0 commit comments

Comments
 (0)