mirror of
https://github.com/WenPai-org/wp-china-yes.git
synced 2025-08-03 11:11:30 +08:00
feat: check hook before clear
This commit is contained in:
parent
435ffd6980
commit
25fdf04fcc
1 changed files with 3 additions and 1 deletions
|
@ -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' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue