Automattic\WooCommerce\Blocks\Domain\Services

Hydration::cache_store_noticesprotectedWC 1.0

Cache notices before hydrating the API if the customer has a session.

Метод класса: Hydration{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->cache_store_notices();

Код Hydration::cache_store_notices() WC 10.4.3

protected function cache_store_notices() {
	if ( ! did_action( 'woocommerce_init' ) || null === WC()->session ) {
		return;
	}
	$this->cached_store_notices = wc_get_notices();
	wc_clear_notices();
}