Address
How it works
Standalone address component
const client = await Elements('YOUR_API_KEY', { env: 'production' });
await client.injectAddressElement('address', {
onAddressSet: (address) => {
console.log('Address set:', address);
}
});Address actions
await window.LiquidCommerce.elements.actions.address.setAddressByPlacesId('ChIJOwg_06VPwokRYv534QaPC8g');
await window.LiquidCommerce.elements.actions.address.setAddressManually(
{
one: '123 Main Street',
two: 'Apt 4',
city: 'New York',
state: 'NY',
zip: '10001'
},
{ latitude: 40.7128, longitude: -74.0060 }
);
const address = window.LiquidCommerce.elements.actions.address.getDetails();
await window.LiquidCommerce.elements.actions.address.clear();Address events (examples)
Last updated

