Automattic\WooCommerce\Admin\RemoteInboxNotifications

RemoteInboxNotificationsEngine::get_stored_state()public staticWC 1.0

Gets the stored state option, and does the initial set up if it doesn't already exist.

Method of the class: RemoteInboxNotificationsEngine{}

No Hooks.

Return

Object. The stored state option.

Usage

$result = RemoteInboxNotificationsEngine::get_stored_state();

RemoteInboxNotificationsEngine::get_stored_state() code WC 8.6.1

public static function get_stored_state() {
	$stored_state = get_option( self::STORED_STATE_OPTION_NAME );

	if ( $stored_state === false ) {
		$stored_state = new \stdClass();

		$stored_state = StoredStateSetupForProducts::init_stored_state(
			$stored_state
		);

		add_option(
			self::STORED_STATE_OPTION_NAME,
			$stored_state,
			'',
			false
		);
	}

	return $stored_state;
}