Skip to content

Commit

Permalink
If main settings are not set, don't run apple pay registration
Browse files Browse the repository at this point in the history
  • Loading branch information
roykho committed Feb 20, 2018
1 parent ad54fa0 commit 3c2fcce
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions includes/class-wc-stripe-apple-pay-registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' ) );
Expand Down

0 comments on commit 3c2fcce

Please sign in to comment.