Automattic\WooCommerce\Admin\RemoteInboxNotifications

StoredStateSetupForProducts::init_stored_state()public staticWC 1.0

Set initial stored state values.

Method of the class: StoredStateSetupForProducts{}

No Hooks.

Return

Object. The stored state.

Usage

$result = StoredStateSetupForProducts::init_stored_state( $stored_state );
$stored_state(object) (required)
The stored state.

StoredStateSetupForProducts::init_stored_state() code WC 7.1.0

public static function init_stored_state( $stored_state ) {
	$stored_state->there_were_no_products = ! self::are_there_products();
	$stored_state->there_are_now_products = ! $stored_state->there_were_no_products;

	return $stored_state;
}