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 Readonly<Ref<BillingAddress | null>> (BETA)
activeShippingAddress Readonly<Ref<ShippingAddress | null>> (BETA)
currency Readonly<Ref<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 Readonly<Ref<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 Readonly<Ref<ShippingMethod | null>> (BETA)