diff --git a/Service/Monitor.php b/Service/Monitor.php index efb8c63..b2be08e 100644 --- a/Service/Monitor.php +++ b/Service/Monitor.php @@ -30,7 +30,9 @@ class Monitor { ] ); } } else { - wp_clear_scheduled_hook( 'wp_china_yes_monitor' ); + if ( wp_get_scheduled_event( 'wp_china_yes_monitor' ) ) { + wp_clear_scheduled_hook( 'wp_china_yes_monitor' ); + } } }