Automattic\WooCommerce\Internal\Admin

WCAdminAssets::get_file_version()public staticWC 1.0

Gets the file modified time as a cache buster if we're in dev mode, or the plugin version otherwise.

Method of the class: WCAdminAssets{}

No Hooks.

Return

String. The cache buster value to use for the given file.

Usage

$result = WCAdminAssets::get_file_version( $ext );
$ext(string) (required)
File extension.

WCAdminAssets::get_file_version() code WC 8.7.0

public static function get_file_version( $ext ) {
	if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
		return filemtime( WC_ADMIN_ABSPATH . self::get_path( $ext ) );
	}
	return WC_VERSION;
}