Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions custom-fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ function wpify_custom_fields(): CustomFields {
* Only runs when the standalone plugin is deactivated,
* not when the library is used as a Composer dependency.
*/
register_deactivation_hook( __FILE__, function() {
wp_clear_scheduled_hook( 'wpifycf_cleanup_temp_files' );
} );
if ( function_exists( 'register_deactivation_hook' ) ) {
register_deactivation_hook( __FILE__, function () {
wp_clear_scheduled_hook( 'wpifycf_cleanup_temp_files' );
} );
}
Loading