WC_Install::run_update_callback()public staticWC 3.6.0

Run an update callback when triggered by ActionScheduler.

Method of the class: WC_Install{}

No Hooks.

Return

null. Nothing (null).

Usage

$result = WC_Install::run_update_callback( $update_callback );
$update_callback(string) (required)
Callback name.

Changelog

Since 3.6.0 Introduced.

WC_Install::run_update_callback() code WC 9.4.2

public static function run_update_callback( $update_callback ) {
	include_once __DIR__ . '/wc-update-functions.php';

	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 );
	}
}