Skip to content

Commit

Permalink
Temporarily disable saving SEPA (#7107)
Browse files Browse the repository at this point in the history
  • Loading branch information
gpressutto5 authored and hsingyuc committed Sep 2, 2023
1 parent 7274a02 commit b0e929c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions changelog/temporarily-disable-saving-sepa
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: update

Temporarily disable saving SEPA
2 changes: 1 addition & 1 deletion includes/payment-methods/class-sepa-payment-method.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function __construct( $token_service ) {
parent::__construct( $token_service );
$this->stripe_id = self::PAYMENT_METHOD_STRIPE_ID;
$this->title = 'SEPA Direct Debit';
$this->is_reusable = true;
$this->is_reusable = false;
$this->currencies = [ 'EUR' ];
$this->icon_url = plugins_url( 'assets/images/payment-methods/sepa-debit.svg', WCPAY_PLUGIN_FILE );
}
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/payment-methods/test-class-upe-payment-gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -1555,7 +1555,7 @@ public function test_payment_methods_show_correct_default_outputs() {
$this->assertEquals( 'SEPA Direct Debit', $sepa_method->get_title() );
$this->assertEquals( 'SEPA Direct Debit', $sepa_method->get_title( $mock_sepa_details ) );
$this->assertTrue( $sepa_method->is_enabled_at_checkout() );
$this->assertTrue( $sepa_method->is_reusable() );
$this->assertFalse( $sepa_method->is_reusable() );

$this->assertEquals( 'ideal', $ideal_method->get_id() );
$this->assertEquals( 'iDEAL', $ideal_method->get_title() );
Expand Down Expand Up @@ -1602,7 +1602,7 @@ public function test_only_reusabled_payment_methods_enabled_with_subscription_it
$this->assertFalse( $sofort_method->is_enabled_at_checkout() );
$this->assertFalse( $bancontact_method->is_enabled_at_checkout() );
$this->assertFalse( $eps_method->is_enabled_at_checkout() );
$this->assertTrue( $sepa_method->is_enabled_at_checkout() );
$this->assertFalse( $sepa_method->is_enabled_at_checkout() );
$this->assertFalse( $p24_method->is_enabled_at_checkout() );
$this->assertFalse( $ideal_method->is_enabled_at_checkout() );
$this->assertFalse( $becs_method->is_enabled_at_checkout() );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1559,7 +1559,7 @@ public function test_payment_methods_show_correct_default_outputs() {
$this->assertEquals( 'SEPA Direct Debit', $sepa_method->get_title() );
$this->assertEquals( 'SEPA Direct Debit', $sepa_method->get_title( $mock_sepa_details ) );
$this->assertTrue( $sepa_method->is_enabled_at_checkout() );
$this->assertTrue( $sepa_method->is_reusable() );
$this->assertFalse( $sepa_method->is_reusable() );

$this->assertEquals( 'ideal', $ideal_method->get_id() );
$this->assertEquals( 'iDEAL', $ideal_method->get_title() );
Expand Down Expand Up @@ -1594,7 +1594,7 @@ public function test_only_reusabled_payment_methods_enabled_with_subscription_it
$this->assertFalse( $sofort_method->is_enabled_at_checkout() );
$this->assertFalse( $bancontact_method->is_enabled_at_checkout() );
$this->assertFalse( $eps_method->is_enabled_at_checkout() );
$this->assertTrue( $sepa_method->is_enabled_at_checkout() );
$this->assertFalse( $sepa_method->is_enabled_at_checkout() );
$this->assertFalse( $p24_method->is_enabled_at_checkout() );
$this->assertFalse( $ideal_method->is_enabled_at_checkout() );
$this->assertFalse( $becs_method->is_enabled_at_checkout() );
Expand Down Expand Up @@ -2044,7 +2044,7 @@ public function test_save_option_for_sepa_debit() {
$this->mock_customer_service
);

$this->assertSame( $upe_checkout->get_payment_fields_js_config()['paymentMethodsConfig'][ Payment_Method::SEPA ]['showSaveOption'], true );
$this->assertSame( $upe_checkout->get_payment_fields_js_config()['paymentMethodsConfig'][ Payment_Method::SEPA ]['showSaveOption'], false );
}

public function test_remove_link_payment_method_if_card_disabled() {
Expand Down

0 comments on commit b0e929c

Please sign in to comment.