Automattic\WooCommerce\Internal\Caches
VersionStringGenerator::delete_version
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() VersionStringGenerator::delete version code WC 10.8.1
public function delete_version( string $id ): bool {
$this->validate_input( $id );
$cache_key = $this->get_cache_key( $id );
$result = wp_cache_delete( $cache_key, self::CACHE_GROUP );
// Some object cache implementations may return non-boolean values.
return ! is_bool( $result ) || $result;
}