From 0d3e2e6a67c95f35b17000ba8111ea4c91c34261 Mon Sep 17 00:00:00 2001 From: ren <18050944+renintw@users.noreply.github.com> Date: Wed, 27 Sep 2023 13:51:05 +0800 Subject: [PATCH] WCOS: Remove wp_clear_scheduled_hook as it doesn't work as expected. Although the cron job is deleted after queuing the email, you can see from the init above that visiting other WP pages immediately re-adds the cron job. --- .../wordcamp-organizer-survey/includes/debrief-survey/cron.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/public_html/wp-content/plugins/wordcamp-organizer-survey/includes/debrief-survey/cron.php b/public_html/wp-content/plugins/wordcamp-organizer-survey/includes/debrief-survey/cron.php index 5eddcaf88..d156d8352 100644 --- a/public_html/wp-content/plugins/wordcamp-organizer-survey/includes/debrief-survey/cron.php +++ b/public_html/wp-content/plugins/wordcamp-organizer-survey/includes/debrief-survey/cron.php @@ -179,7 +179,4 @@ function queue_organizer_survey() { } else { log( 'Email status change to `pending`.', $email_id ); } - - // Remove the cron job that queues everything. - wp_clear_scheduled_hook( 'wc_organizer_debrief_survey_email' ); }