surecart/{object_name}/attributes_set
Fired after all attributes are set on a model. Useful for adding computed properties or modifying model data after it’s been fully populated.
surecart/{object_name}/attributes/{key}
Filter individual attribute values as they are being set on a model during hydration. This allows you to transform, validate, or modify any attribute before it’s stored on the model.
Parameters:
$value(mixed) – The value being set for the attribute$model(Model) – The model instance
surecart/{object_name}/set_meta_data
Filter metadata before it’s set on a model during hydration. Useful for ensuring metadata structure, adding defaults, or transforming metadata values.
Parameters:
$meta_data(array|object) – The metadata being set
Available Models
You can hook into hydration events for these models:subscription- Subscription datapurchase- Purchase dataproduct- Product dataprice- Price datacustomer- Customer dataorder- Order datacheckout- Checkout datacharge- Payment charge datarefund- Refund datainvoice- Invoice datacoupon- Coupon data
Related
Products
Hook into product creation, updates, and deletion events.
Purchases
Higher-level purchase events built on model actions.