Skip to content

Commit

Permalink
Continue loading WCPay if the account is currently connected.
Browse files Browse the repository at this point in the history
  • Loading branch information
htdat committed Sep 29, 2021
1 parent 07ed01d commit 87c34e4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion includes/class-wc-payments.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,16 @@ public static function init() {

if ( ! self::check_plugin_dependencies( true ) ) {
add_filter( 'admin_notices', [ __CLASS__, 'check_plugin_dependencies' ] );
return;

/**
* After displaying notice errors in WP Admin, still silently load the plugin if the account is connected.
*
* @since 3.1.0
*/
$account_data = get_option( 'wcpay_account_data' );
if ( ! isset( $account_data['account'] ) ) {
return;
};
}

add_action( 'admin_init', [ __CLASS__, 'add_woo_admin_notes' ] );
Expand Down

0 comments on commit 87c34e4

Please sign in to comment.