id ) && false !== strpos( $screen->id, 'wpconsent_page_wpconsent-' ) ) { $screen = str_replace( 'wpconsent_page_wpconsent-', '', $screen->id ); } elseif ( isset( $screen->id ) && false !== strpos( $screen->id, 'toplevel_page_wpconsent' ) ) { $screen = 'dashboard'; } else { $screen = 'dashboard'; } $upgrade_url = wpconsent_utm_url( 'https://wpconsent.com/lite/', 'top-notice', $screen ); WPConsent_Notice::top( sprintf( // Translators: %1$s and %2$s add a link to the upgrade page. %3$s and %4$s make the text bold. __( '%3$sYou\'re using WPConsent Lite%4$s. To unlock more features consider %1$supgrading to Pro%2$s.', 'wpconsent-cookies-banner-privacy-suite' ), '', '', '', '' ), array( 'dismiss' => WPConsent_Notice::DISMISS_USER, 'slug' => 'consider-upgrading', ) ); } /** * Show a notice with more features at the bottom of the main WPConsent page. * * @return void */ function wpconsent_upgrade_to_pro_notice() { // Don't show if other notices were already displayed on the page. if ( ! empty( wpconsent()->notice->notices ) ) { return; } $html = '
' . esc_html__( 'Thank you for being a loyal WPConsent Lite user. Upgrade to WPConsent Pro to automate more of your compliance checklist and focus on your business.', 'wpconsent-cookies-banner-privacy-suite' ) . '
'; // Additional subheading to create more space and mirror the Pro features subheading style. $html .= ''; $html .= sprintf( // Translators: Placeholders make the text bold. esc_html__( '%1$sBonus:%2$s WPConsent Lite users get %3$s50%% off regular price%4$s, automatically applied at checkout', 'wpconsent-cookies-banner-privacy-suite' ), '', '', '', '' ); $html .= '
'; // Add our custom notice for this page. WPConsent_Notice::info( $html, array( 'slug' => 'wpconsent-dashboard-pro', 'dismiss' => WPConsent_Notice::DISMISS_USER, ) ); // Display notice we just added so that scripts are loaded. if ( method_exists( wpconsent()->notice, 'display' ) ) { wpconsent()->notice->display(); } }