Automattic\WooCommerce\Internal\Caches

VersionStringGenerator::delete_versionpublicWC 10.4.0

Delete the version string for an ID by deleting its cached entry.

Method of the class: VersionStringGenerator{}

No Hooks.

Returns

true|false. True on success, false on failure.

Usage

$VersionStringGenerator = new VersionStringGenerator();
$VersionStringGenerator->delete_version( $id ): bool;
$id(string) (required)
The ID to delete the version string for.

Changelog

Since 10.4.0 Introduced.

VersionStringGenerator::delete_version() code WC 10.4.3

public function delete_version( string $id ): bool {
	$this->validate_input( $id );

	$cache_key = $this->get_cache_key( $id );
	return wp_cache_delete( $cache_key, self::CACHE_GROUP );
}