| @@ -285,10 +285,23 @@ | ||
| 285 | 285 | * @Since 2.2.5 |
| 286 | 286 | */ |
| 287 | 287 | add_action('init', function() |
| 288 | 288 | { |
| 289 | - if ( ( !isset($_GET['page']) || $_GET['page'] != 'profile-builder-pms-promo' ) && function_exists('is_plugin_active') && !is_plugin_active( 'paid-member-subscriptions/index.php' ) ){ | |
| 290 | - new WPPB_Add_General_Notices('wppb_pms_cross_promo', | |
| 291 | - sprintf(__('Allow your users to have <strong>paid accounts with Profile Builder</strong>. %1$sFind out how >%2$s %3$sDismiss%4$s', 'profile-builder'), "<a href='" . esc_url( admin_url('options.php?page=profile-builder-pms-promo') ) . "'>", "</a>", "<a class='wppb-dismiss-notification' href='" . esc_url( wp_nonce_url( add_query_arg( 'wppb_pms_cross_promo_dismiss_notification', '0' ), 'wppb_general_notice_dismiss' ) ) . "'>", "</a>"), | |
| 292 | - 'pms-cross-promo'); | |
| 289 | + $is_pms_promo_page = isset( $_GET['page'] ) && $_GET['page'] === 'profile-builder-pms-promo'; | |
| 290 | + $is_setup_wizard = isset( $_GET['subpage'] ) && $_GET['subpage'] === 'wppb-setup'; | |
| 291 | + | |
| 292 | + if ( $is_pms_promo_page || $is_setup_wizard ) { | |
| 293 | + return; | |
| 293 | 294 | } |
| 294 | -}); | |
| 295 | + | |
| 296 | + if ( ! function_exists( 'is_plugin_active' ) || is_plugin_active( 'paid-member-subscriptions/index.php' ) ) { | |
| 297 | + return; | |
| 298 | + } | |
| 299 | + | |
| 300 | + if ( ! wppb_should_show_marketing_notice() ) { | |
| 301 | + return; | |
| 302 | + } | |
| 303 | + | |
| 304 | + new WPPB_Add_General_Notices('wppb_pms_cross_promo', | |
| 305 | + sprintf(__('Allow your users to have <strong>paid accounts with Profile Builder</strong>. %1$sFind out how >%2$s %3$sDismiss%4$s', 'profile-builder'), "<a href='" . esc_url( admin_url('options.php?page=profile-builder-pms-promo') ) . "'>", "</a>", "<a class='wppb-dismiss-notification' href='" . esc_url( wp_nonce_url( add_query_arg( 'wppb_pms_cross_promo_dismiss_notification', '0' ), 'wppb_general_notice_dismiss' ) ) . "'>", "</a>"), | |
| 306 | + 'pms-cross-promo'); | |
| 307 | +}); | |