diff --git a/admin/section/class-convertkit-admin-settings-broadcasts.php b/admin/section/class-convertkit-admin-settings-broadcasts.php index 99ef634f3..39ee1555d 100644 --- a/admin/section/class-convertkit-admin-settings-broadcasts.php +++ b/admin/section/class-convertkit-admin-settings-broadcasts.php @@ -157,8 +157,9 @@ public function register_fields() { // Define description for the 'Enabled' setting. // If enabled, include the next scheduled date and time the Plugin will import broadcasts. + // If the next scheduled timestamp is 1, the event is running now. $enabled_description = ''; - if ( $this->settings->enabled() && $posts->get_cron_event_next_scheduled() ) { + if ( $this->settings->enabled() && $posts->get_cron_event_next_scheduled() && $posts->get_cron_event_next_scheduled() > 1 ) { $enabled_description = sprintf( '%s %s', esc_html__( 'Broadcasts will next import at approximately ', 'convertkit' ), diff --git a/tests/acceptance/broadcasts/import/BroadcastsToPostsCest.php b/tests/acceptance/broadcasts/import/BroadcastsToPostsCest.php index f647f77e6..4ab70a7ce 100644 --- a/tests/acceptance/broadcasts/import/BroadcastsToPostsCest.php +++ b/tests/acceptance/broadcasts/import/BroadcastsToPostsCest.php @@ -185,6 +185,9 @@ public function testBroadcastsManualImportWhenEnabled(AcceptanceTester $I) // Confirm a success message displays. $I->see('Broadcasts import started. Check the Posts screen shortly to confirm Broadcasts imported successfully.'); + // Confirm the next scheduled date/time is not displayed, as the event is running. + $I->dontSee('Broadcasts will next import at approximately'); + // Wait a few seconds for the Cron event to complete importing Broadcasts. $I->wait(7);