Skip to content

Commit aec38a9

Browse files
committed
Use the correct status canceled (single letter l rather than the double one)
1 parent 0028acf commit aec38a9

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

includes/class-wc-payments-webhook-processing-service.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ private function process_webhook_refund_updated( $event_body ) {
300300
$this->order_service->handle_insufficient_balance_for_refund( $order, $amount );
301301
}
302302
break;
303-
case Refund_Status::CANCELLED:
303+
case Refund_Status::CANCELED:
304304
$this->order_service->handle_failed_refund( $order, $refund_id, $amount, $currency, $matched_wc_refund, true );
305305
break;
306306
case Refund_Status::SUCCEEDED:

includes/constants/class-refund-status.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ class Refund_Status extends Base_Constant {
2020
const PENDING = 'pending';
2121
const SUCCEEDED = 'succeeded';
2222
const FAILED = 'failed';
23-
const CANCELLED = 'cancelled';
23+
const CANCELED = 'cancelled';
2424
}

tests/unit/test-class-wc-payments-webhook-processing-service.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ public function test_cancelled_refund_update_webhook_with_matched_wc_refund() {
355355
$this->event_body['type'] = 'charge.refund.updated';
356356
$this->event_body['livemode'] = true;
357357
$this->event_body['data']['object'] = [
358-
'status' => Refund_Status::CANCELLED,
358+
'status' => Refund_Status::CANCELED,
359359
'charge' => 'test_charge_id',
360360
'id' => 'test_refund_id',
361361
'amount' => 999,

0 commit comments

Comments
 (0)