Skip to content

Commit

Permalink
Fix cancellation spelling (#7354)
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardola authored Oct 31, 2023
1 parent ad935b0 commit 20aaa54
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions changelog/fix-cancellation-spelling
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Fix spelling of cancellation
2 changes: 1 addition & 1 deletion client/disputes/strings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ export const reasons: Record<
'woocommerce-payments'
),
__(
'If you can not prove the customer’s subscription was canceled, and or they did not follow your cancelation policy, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.',
'If you can not prove the customer’s subscription was canceled, and or they did not follow your cancellation policy, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.',
'woocommerce-payments'
),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ public function cancel_authorization( WP_REST_Request $request ) {
$intent_meta_order_id_raw = $intent_metadata['order_id'] ?? '';
$intent_meta_order_id = is_numeric( $intent_meta_order_id_raw ) ? intval( $intent_meta_order_id_raw ) : 0;
if ( $intent_meta_order_id !== $order->get_id() ) {
Logger::error( 'Payment cancelation rejected due to failed validation: order id on intent is incorrect or missing.' );
Logger::error( 'Payment cancellation rejected due to failed validation: order id on intent is incorrect or missing.' );
return new WP_Error( 'wcpay_intent_order_mismatch', __( 'The payment cannot be canceled', 'woocommerce-payments' ), [ 'status' => 409 ] );
}
if ( ! in_array( $intent->get_status(), [ Intent_Status::REQUIRES_CAPTURE ], true ) ) {
Expand Down

0 comments on commit 20aaa54

Please sign in to comment.