From a4cdfc4d194cb9d4e1aefabaac47476196ecab86 Mon Sep 17 00:00:00 2001 From: Petr Pojer Date: Wed, 12 Nov 2025 09:34:48 +0100 Subject: [PATCH] Undefined function fix (skeleton issue) --- custom-fields.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/custom-fields.php b/custom-fields.php index 773560c..c1bc98d 100644 --- a/custom-fields.php +++ b/custom-fields.php @@ -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' ); + } ); +}