Automattic\WooCommerce\Admin\RemoteInboxNotifications

RemoteInboxNotificationsEngine::get_stored_statepublic staticWC 1.0

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

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

Хуков нет.

Возвращает

Объект. The stored state option.

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

$result = RemoteInboxNotificationsEngine::get_stored_state();

Код RemoteInboxNotificationsEngine::get_stored_state() WC 9.9.3

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

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

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

		update_option(
			self::STORED_STATE_OPTION_NAME,
			$stored_state,
			false
		);
	}

	return $stored_state;
}