From 64f96db1ec603a1f3a1e9cc35ae658f5ef67c93c Mon Sep 17 00:00:00 2001 From: Codebard Date: Thu, 26 Nov 2020 15:41:01 -0500 Subject: [PATCH] Added id to setup wizard nag. Added code to allow dismissing setup wizard nag. Now setup wizard nag shows only when it is not dismissed. --- classes/patreon_wordpress.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/classes/patreon_wordpress.php b/classes/patreon_wordpress.php index b6a37f7..a6810b3 100644 --- a/classes/patreon_wordpress.php +++ b/classes/patreon_wordpress.php @@ -903,11 +903,13 @@ public static function AdminMessages() { // Check if this site is a v2 site - temporary until we move to make all installations v2 $api_version = get_option( 'patreon-installation-api-version', false ); + + $setup_wizard_notice_dismissed = get_option( 'patreon-setup-wizard-notice-dismissed', false ); - if( !$setup_done AND ( $api_version AND $api_version == '2' ) AND current_user_can( 'manage_options' ) ) { + if( !$setup_done AND !$setup_wizard_notice_dismissed AND ( $api_version AND $api_version == '2' ) AND current_user_can( 'manage_options' ) ) { ?> -
+

We must connect your site to Patreon to enable Patreon features. Please click here to start the setup wizard