WC_Cache_Helper::delete_transients_on_shutdown()public staticWC 3.6.0

Transients that don't need to be cleaned right away can be deleted on shutdown to avoid repetition.

Method of the class: WC_Cache_Helper{}

No Hooks.

Return

null. Nothing.

Usage

$result = WC_Cache_Helper::delete_transients_on_shutdown();

Changelog

Since 3.6.0 Introduced.

WC_Cache_Helper::delete_transients_on_shutdown() code WC 7.3.0

public static function delete_transients_on_shutdown() {
	if ( self::$delete_transients ) {
		foreach ( self::$delete_transients as $key ) {
			delete_transient( $key );
		}
		self::$delete_transients = array();
	}
}