WC_Install::needs_db_updatepublic staticWC 3.2.0

Is a DB update needed?

Method of the class: WC_Install{}

No Hooks.

Returns

true|false.

Usage

$result = WC_Install::needs_db_update();

Changelog

Since 3.2.0 Introduced.

WC_Install::needs_db_update() code WC 10.4.3

public static function needs_db_update() {
	$current_db_version = get_option( 'woocommerce_db_version', null );

	return ! is_null( $current_db_version ) && version_compare( $current_db_version, array_key_last( self::$db_updates ), '<' );
}