Skip to content

Commit 9824c94

Browse files
dmallory42vladolaru
authored andcommitted
Update to the copy on the WooPayments delete test orders tool. (#11118)
1 parent c76a440 commit 9824c94

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

changelog/dev-test-mode-text-fix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: minor
2+
Type: update
3+
4+
Minor copy update to the delete test orders tool.

includes/class-wc-payments-status.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,15 @@ public function debug_tools( $tools ) {
8181
'callback' => [ $this->account, 'refresh_account_data' ],
8282
],
8383
'delete_wcpay_test_orders' => [
84-
'name' => __( 'Delete test orders', 'woocommerce-payments' ),
84+
'name' => sprintf(
85+
/* translators: %s: WooPayments */
86+
__( 'Delete %s test orders', 'woocommerce-payments' ),
87+
'WooPayments'
88+
),
8589
'button' => __( 'Delete', 'woocommerce-payments' ),
8690
'desc' => sprintf(
8791
/* translators: %s: WooPayments */
88-
__( '<strong class="red">Note:</strong> This option will delete ALL orders created while %s test mode was enabled, use with caution. This action cannot be reversed.', 'woocommerce-payments' ),
92+
__( '<strong class="red">Note:</strong> This option deletes all test mode orders placed via %s. Orders placed via other gateways will not be affected. Use with caution, as this action cannot be undone.', 'woocommerce-payments' ),
8993
'WooPayments'
9094
),
9195
'callback' => [ $this, 'delete_test_orders' ],

tests/unit/test-class-wc-payments-status.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,13 @@ public function test_delete_test_orders_tool_structure() {
9494
$this->assertArrayHasKey( 'desc', $delete_tool );
9595
$this->assertArrayHasKey( 'callback', $delete_tool );
9696

97-
$this->assertEquals( 'Delete test orders', $delete_tool['name'] );
97+
$this->assertEquals( 'Delete WooPayments test orders', $delete_tool['name'] );
9898
$this->assertEquals( 'Delete', $delete_tool['button'] );
9999
$this->assertStringContainsString( 'Note:', $delete_tool['desc'] );
100100
$this->assertStringContainsString( 'strong class="red"', $delete_tool['desc'] );
101-
$this->assertStringContainsString( 'delete ALL orders created while', $delete_tool['desc'] );
102-
$this->assertStringContainsString( 'test mode was enabled', $delete_tool['desc'] );
103-
$this->assertStringContainsString( 'cannot be reversed', $delete_tool['desc'] );
101+
$this->assertStringContainsString( 'deletes all test mode orders placed via', $delete_tool['desc'] );
102+
$this->assertStringContainsString( 'Orders placed via other gateways will not be affected', $delete_tool['desc'] );
103+
$this->assertStringContainsString( 'cannot be undone', $delete_tool['desc'] );
104104
}
105105

106106
/**

0 commit comments

Comments
 (0)