Home > @shopware-pwa/composables > IUseSessionContext

# IUseSessionContext interface

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

interface for useSessionContext() composable


export interface IUseSessionContext 

# Remarks

SessionContext contain all related data like user, currency, country, shippingMethod, paymentMethod etc.

# Properties

Property Type Description
activeBillingAddress ComputedRef<BillingAddress | null> (BETA)
activeShippingAddress ComputedRef<ShippingAddress | null> (BETA)
countryId ComputedRef<string | undefined> (BETA)
currency ComputedRef<Currency | null> (BETA)
onCurrencyChange (fn: (params: { currency: Currency; }) => void) => void (BETA)
onPaymentMethodChange (fn: (params: { paymentMethod: PaymentMethod; }) => void) => void (BETA)
onShippingMethodChange (fn: (params: { shippingMethod: ShippingMethod; }) => void) => void (BETA)
paymentMethod ComputedRef<PaymentMethod | null> (BETA)
refreshSessionContext () => Promise<void> (BETA)
sessionContext ComputedRef<SessionContext | null> (BETA)
setActiveBillingAddress (address: Partial<BillingAddress>) => Promise<void> (BETA)
setActiveShippingAddress (address: Partial<ShippingAddress>) => Promise<void> (BETA)
setCurrency (currency: Partial<Currency>) => Promise<void> (BETA)
setPaymentMethod (paymentMethod: Partial<PaymentMethod>) => Promise<void> (BETA)
setShippingMethod (shippingMethod: Partial<ShippingMethod>) => Promise<void> (BETA)
shippingMethod ComputedRef<ShippingMethod | null> (BETA)