Created
August 31, 2022 18:47
-
-
Save bwmarkle/c3ad9d5e7e2667f5c66c4ac564c7b050 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'pre_clear_scheduled_hook', function( $null, $hook, $args, $wp_error ) { | |
$core = apply_filters( 'boldgrid_backup_get_core', false ); | |
$logger = new Boldgrid_Backup_Admin_Log( $core ); | |
$logger->init( 'pre_clear_scheduled_hook.log' ); | |
// We want to include the trace to see what is clearing the schedule. | |
$e = new \Exception(); | |
$e = explode( "\n", $e->getTraceAsString() ); | |
$logger->add( print_r( array( | |
'$hook' => $hook, | |
'$args' => $args, | |
'$wp_error' => $wp_error, | |
'$e' => $e, | |
), 1 ) ); | |
return null; | |
}, 10, 4 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment