Wr
webround-docs / Wr
Interface: Wr
Defined in: wr.d.ts:1335
The global wr prop injected into every Webround custom component.
It provides access to the shop catalog, authenticated customer data, checkout cart, account UI state, and utility functions.
Example
const MyComponent = ({ wr }: { wr: Wr }) => {
const { products, isLoading } = wr.shop;
const { profile, isLoggedIn } = wr.customer;
return <div>{isLoggedIn ? profile.displayName : 'Guest'}</div>;
};
export default MyComponent;
Indexable
[
key:string]:any
Properties
account
account:
WrAccount
Defined in: wr.d.ts:1351
Account page UI state
cart
cart:
WrCartContext
Defined in: wr.d.ts:1349
Checkout cart context — delivery, shipping, and addresses
currentPage
currentPage:
string
Defined in: wr.d.ts:1343
Current page path (e.g. '/shop', '/product/my-product')
customer
customer:
WrCustomer
Defined in: wr.d.ts:1347
Authenticated customer data, cart, wishlist, orders, and auth actions
inEditor
inEditor:
boolean
Defined in: wr.d.ts:1341
Whether the component is rendering inside the Webround editor
languages
languages:
string[]
Defined in: wr.d.ts:1339
All locale codes configured for this site
locale
locale:
string
Defined in: wr.d.ts:1337
Active locale code (e.g. 'en', 'it')
product?
optionalproduct?:WrProduct
Defined in: wr.d.ts:1358
The product associated with this component instance. Only available when used as a Product Card Override.
shop
shop:
WrShop
Defined in: wr.d.ts:1345
Shop catalog, filters, collections, and search
utils
utils:
WrUtils
Defined in: wr.d.ts:1353
Navigation, form submission, and localization utilities