do not show enable button on start screen

This commit is contained in:
David Remer 2020-09-24 12:49:57 +03:00
parent 16ad8c9cd1
commit 3281043bc2

View file

@ -165,7 +165,9 @@ class PayPalGateway extends \WC_Payment_Gateway {
'type' => 'ppcp',
),
);
if ( $this->is_credit_card_tab() ) {
$should_show_enabled_checkbox = ! $this->is_credit_card_tab() && ( $this->config->has( 'merchant_email' ) && $this->config->get( 'merchant_email' ) );
if ( ! $should_show_enabled_checkbox ) {
unset( $this->form_fields['enabled'] );
}
}