Automattic\WooCommerce\Internal\EmailEditor\WCTransactionalEmails
WCEmailTemplateChangeSummary::write_cache
Write a payload to the transient cache, pre-stamping cache_hit so any subsequent read is honest about its origin.
Метод класса: WCEmailTemplateChangeSummary{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$result = WCEmailTemplateChangeSummary::write_cache( $cache_key, $payload ): void;
- $cache_key(строка) (обязательный)
- Transient key.
- $payload(array<string, mixed>) (обязательный)
- The payload to cache.
Код WCEmailTemplateChangeSummary::write_cache() WCEmailTemplateChangeSummary::write cache WC 11.2.2
private static function write_cache( string $cache_key, array $payload ): void {
$to_cache = $payload;
$to_cache['cache_hit'] = true;
set_transient( $cache_key, $to_cache, self::CACHE_TTL );
}