'cartflows-ca-5-star-notice', 'type' => 'info', 'class' => 'cartflows-ca-5-star', 'show_if' => true, /* translators: %1$s white label plugin name and %2$s deactivation link */ 'message' => sprintf( '
%2$s
%3$s
%5$s %7$s %8$s
', $image_path, __( 'Hello! Seems like you have used WooCommerce Cart Abandonment Recovery by CartFlows plugin to recover abandoned carts. — Thanks a ton!', 'woo-cart-abandonment-recovery' ), __( 'Could you please do us a BIG favor and give it a 5-star rating on WordPress? This would boost our motivation and help other users make a comfortable decision while choosing the CartFlows cart abandonment plugin.', 'woo-cart-abandonment-recovery' ), $review_url, __( 'Ok, you deserve it', 'woo-cart-abandonment-recovery' ), MONTH_IN_SECONDS, __( 'Nope, maybe later', 'woo-cart-abandonment-recovery' ), __( 'I already did', 'woo-cart-abandonment-recovery' ) ), 'repeat-notice-after' => MONTH_IN_SECONDS, 'display-notice-after' => ( 3 * WEEK_IN_SECONDS ), // Display notice after 2 weeks. ) ); } /** * Show the weekly email Notice * * @return void */ public function show_weekly_report_email_settings_notice() { if ( ! $this->allowed_screen_for_notices() ) { return; } $is_show_notice = get_option( 'wcf_ca_show_weekly_report_email_notice', 'no' ); if ( 'yes' === $is_show_notice && current_user_can( 'manage_options' ) ) { $setting_url = admin_url( 'admin.php?page=woo-cart-abandonment-recovery&action=settings#wcf-ca-weekly-report-email-settings' ); /* translators: %1$s Software Title, %2$s Plugin, %3$s Anchor opening tag, %4$s Anchor closing tag, %5$s Software Title. */ $message = sprintf( __( '%1$sWooCommerce Cart Abandonment recovery:%2$s We just introduced an awesome new feature, weekly order recovery reports via email. Now you can see how many orders we are recovering for your store each week, without having to log into your website. You can set the email address for these email from %3$shere.%4$s', 'woo-cart-abandonment-recovery' ), '', '', '', '' ); $output = '
'; $output .= '

' . $message . '

'; $output .= '
'; echo wp_kses_post( $output ); } } /** * Disable the weekly email Notice * * @return void */ public function disable_weekly_report_email_notice() { if ( ! current_user_can( 'manage_woocommerce' ) ) { return; } check_ajax_referer( 'wcar_disable_weekly_report_email_notice', 'security' ); delete_option( 'wcf_ca_show_weekly_report_email_notice' ); wp_send_json_success(); } /** * Check allowed screen for notices. * * @return bool */ public function allowed_screen_for_notices() { $screen = get_current_screen(); $screen_id = $screen ? $screen->id : ''; $allowed_screens = array( 'woocommerce_page_woo-cart-abandonment-recovery', 'dashboard', 'plugins', ); if ( in_array( $screen_id, $allowed_screens, true ) ) { return true; } return false; } } Cartflows_Ca_Admin_Notices::get_instance();