From e6a7f0f40a561dd5a9f0b8c25bd1921ec9953989 Mon Sep 17 00:00:00 2001 From: Gary Cao Date: Thu, 10 Dec 2020 15:21:34 +0900 Subject: [PATCH] Fix Unknown named parameter error on PHP 8 --- includes/class-wc-install.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/includes/class-wc-install.php b/includes/class-wc-install.php index 7419ae0ea7f..f79bfdafda7 100644 --- a/includes/class-wc-install.php +++ b/includes/class-wc-install.php @@ -221,16 +221,17 @@ class WC_Install { /** * Run an update callback when triggered by ActionScheduler. * + * @param string $update_callback Callback name. + * * @since 3.6.0 - * @param string $callback Callback name. */ - public static function run_update_callback( $callback ) { + public static function run_update_callback( $update_callback ) { include_once dirname( __FILE__ ) . '/wc-update-functions.php'; - if ( is_callable( $callback ) ) { - self::run_update_callback_start( $callback ); - $result = (bool) call_user_func( $callback ); - self::run_update_callback_end( $callback, $result ); + if ( is_callable( $update_callback ) ) { + self::run_update_callback_start( $update_callback ); + $result = (bool) call_user_func( $update_callback ); + self::run_update_callback_end( $update_callback, $result ); } }