diff --git a/readme.txt b/readme.txt index 7e258a4..079cdfa 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://scanfully.com Tags: scanfully, performance, monitoring, site health Requires at least: 6.0 Tested up to: 6.5.3 -Stable tag: 1.2.4 +Stable tag: 1.2.5 License: GPLv3 or later License URI: http://www.gnu.org/licenses/gpl-3.0.html Requires PHP: 7.4 @@ -93,6 +93,9 @@ No, our plugin on listens to changes in the WordPress backend and sends these ch == Changelog == += 1.2.5 : Jun 18, 2024 = +* Tweak: Directly run site health cron jobs after connecting. + = 1.2.4 : Jun 15, 2024 = * Tweak: Updated logos. * Tweak: Set correct event names for pluginactivate and plugindeactivate events. diff --git a/scanfully.php b/scanfully.php index 76a705b..3d96846 100644 --- a/scanfully.php +++ b/scanfully.php @@ -8,7 +8,7 @@ * * @wordpress-plugin * Plugin Name: Scanfully - * Version: 1.2.4 + * Version: 1.2.5 * Plugin URI: https://scanfully.com/wp-plugin * Description: Scanfully is your favorite WordPress performance and health monitoring tool. * Author: Scanfully @@ -46,7 +46,7 @@ function Scanfully(): \Scanfully\Main { add_action( 'plugins_loaded', function () { // meta define( 'SCANFULLY_PLUGIN_FILE', __FILE__ ); - define( 'SCANFULLY_VERSION', '1.2.4' ); + define( 'SCANFULLY_VERSION', '1.2.5' ); // boot require 'vendor/autoload.php'; diff --git a/src/Connect/Controller.php b/src/Connect/Controller.php index 951f18b..15c2fff 100644 --- a/src/Connect/Controller.php +++ b/src/Connect/Controller.php @@ -173,6 +173,11 @@ private static function handle_request_connect_success(): void { // save options OptionsController::set_options( $options ); + + // run cron jobs a single time so user doesn't have to wait for the next cron job + wp_schedule_single_event( time(), 'scanfully_daily' ); + wp_schedule_single_event( time(), 'scanfully_twice_daily' ); + // redirect to base connect page with success message wp_redirect( add_query_arg( [ 'scanfully-connect-done' => '1' ], Page::get_page_url() ) ); }