$time, 'dismissed' => false, ]; update_option( self::NOTICE_OPTION, $review ); } else { // Check if it has been dismissed or not. if ( isset( $review['dismissed'] ) && ! $review['dismissed'] ) { $load = true; } } // If we cannot load, return early. if ( ! $load ) { return; } $this->review(); } /** * Maybe show review request. * * @since 2.1.0 */ private function review() { // Get the currently selected mailer. $mailer = Options::init()->get( 'mail', 'mailer' ); // Skip if no or the default mailer is selected. if ( empty( $mailer ) || $mailer === 'mail' ) { return; } // Fetch when plugin was initially activated. $activated = get_option( 'wp_mail_smtp_activated_time' ); // Skip if the plugin activated time is not set. if ( empty( $activated ) ) { return; } // Check if mailer setup is complete. $mailer_setup_complete = wp_mail_smtp() ->get_providers() ->get_mailer( $mailer, wp_mail_smtp()->get_processor()->get_phpmailer() ) ->is_mailer_complete(); // Skip if the mailer is not set or the plugin is active for less then a defined number of days. if ( ! $mailer_setup_complete || ( $activated + ( DAY_IN_SECONDS * self::WAIT_PERIOD ) ) > time() ) { return; } // We have a candidate! Output a review message. ?>


blog_id ); update_option( self::NOTICE_OPTION, $review ); restore_current_blog(); } } wp_send_json_success(); } }