diff --git a/includes/class-wc-stripe-apple-pay-registration.php b/includes/class-wc-stripe-apple-pay-registration.php index f75698d3a..65ce576da 100644 --- a/includes/class-wc-stripe-apple-pay-registration.php +++ b/includes/class-wc-stripe-apple-pay-registration.php @@ -67,6 +67,11 @@ public function __construct() { $this->apple_pay_verify_notice = ''; $this->testmode = 'yes' === $this->get_option( 'testmode', 'no' ); $this->secret_key = $this->testmode ? $this->get_option( 'test_secret_key' ) : $this->get_option( 'secret_key' ); + + if ( empty( $this->stripe_settings ) ) { + return; + } + $this->init_apple_pay(); add_action( 'admin_notices', array( $this, 'admin_notices' ) );