CouponsImported
Fires for each page of up to 100 coupons a coupon rebuild reads from a store.
WordPress plugin
Last updated: October 26, 2026
CouponsImported fires for each page of a store’s existing coupons, up to 100, that a coupon rebuild reads. One event per page keeps a store with thousands of coupons to a few calls. It says what happened in the store and asks for nothing back. Siren’s coupon records listen and keep their copy of the store’s coupon in step, which is how a code a collaborator holds follows the store’s coupon.
The event is identified as coupons_imported and lives in Siren\Commerce\Events\CouponsImported. On WordPress, a background job that runs once, during the upgrade that adds coupon records, raises it for each page of WooCommerce, Easy Digital Downloads, and LifterLMS coupons. Normal store activity never raises it. Siren Cloud raises it when a connected WordPress site forwards one.
What does this event carry?
integration, the integration’s id, such aswc.coupons, a list ofStoreCouponmodels.changedAt, when Siren read the page, so a later single change still wins.propertyId, the store’s Property when the sender names it, such as Siren Cloud rebuilding a connected site’s event. Null means the current store.
A StoreCoupon holds platformId (the store’s own id for the coupon), code (as shoppers type it, empty when the store didn’t say), bindingCode (the value a sale names the coupon by when it differs from the code, such as a Stripe promotion code id), and deleted. It carries only what Siren needs to index the coupon. Amounts, limits, and expiry stay in the store.
use Siren\Commerce\Events\CouponsImported;
public function handle(Event $event): void
{
foreach ($event->coupons as $coupon) {
$code = $coupon->code;
}
}
When would you use it?
Use it to mirror a store’s coupons somewhere else, or to react when a coupon that credits a collaborator changes. CouponApplied is the event for a coupon being used at checkout. Manage Coupon Codes covers coupon records from the dashboard.