Skip to content

02. Primary addresses and events

Luca Longo edited this page Aug 10, 2020 · 1 revision

Any address can be marked as primary when needed, but only one address per-type (generic/billing/shipping) for time.

$address->markPrimary();
$addrees->unmarkPrimary();

Events

These two events are always fired, for any type of address (shipping or billing).

  • AddressPrimaryMarked is fired on marked an address as primary.
  • AddressPrimaryUnmarked is fired when un-marked an address from the primary.

If you need to handle more accuracy events, the package offers these events:

  • BillingAddressPrimaryMarked is fired on marked a billing address as primary.
  • BillingAddressPrimaryUnmarked is fired when un-mark a billing address is from primary.
  • ShippingAddressPrimaryMarked is fired on marked a shipping address as primary.
  • ShippingAddressPrimaryUnmarked is fired when un-mark a shipping address from primary.
Clone this wiki locally