Skip to content

Commit b4e214c

Browse files
authored
If the custom payment method name is empty, use the default UPE title (#2291)
1 parent 0f02adb commit b4e214c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

includes/payment-methods/class-wc-stripe-upe-payment-gateway.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function __construct() {
121121
$this->maybe_init_pre_orders();
122122

123123
$main_settings = get_option( 'woocommerce_stripe_settings' );
124-
$this->title = $this->get_option( 'title_upe' );
124+
$this->title = ! empty( $this->get_option( 'title_upe' ) ) ? $this->get_option( 'title_upe' ) : $this->form_fields['title_upe']['default'];
125125
$this->description = '';
126126
$this->enabled = $this->get_option( 'enabled' );
127127
$this->saved_cards = 'yes' === $this->get_option( 'saved_cards' );

0 commit comments

Comments
 (0)