Automattic\WooCommerce\Blocks\Domain\Services

Hydration::cache_store_noticesprotectedWC 1.0

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

Method of the class: Hydration{}

No Hooks.

Returns

null. Nothing (null).

Usage

// protected - for code of main (parent) or child class
$result = $this->cache_store_notices();

Hydration::cache_store_notices() code WC 9.9.4

protected function cache_store_notices() {
	if ( ! did_action( 'woocommerce_init' ) || null === WC()->session ) {
		return;
	}
	$this->cached_store_notices = WC()->session->get( 'wc_notices', array() );
	WC()->session->set( 'wc_notices', null );
}