GiftRocket provides actions and filters so developers can change its behaviour without editing plugin files.
Filters
| Filter | Default | What it changes |
|---|---|---|
giftrocketsure_apply_max_failed_attempts | 5 | Wrong codes allowed per IP before checkout is paused |
giftrocketsure_apply_failed_attempts_window | 60 | Seconds the wrong-code counter lasts |
giftrocketsure_max_custom_uploads_per_hour | 10 | Photo uploads per customer per hour |
giftrocketsure_orphan_upload_grace_period | 7 days (seconds) | How long unused uploads are kept (minimum 1 day) |
giftrocketsure_orphan_upload_batch_size | 200 | Files checked per cleanup run |
giftrocketsure_is_checkout_page | auto-detected | Whether the gift card field loads on the current page |
giftrocketsure_products | array | The list of gift card products |
giftrocketsure_epasscard_api_base | Epasscard production URL | The Epasscard API address |
giftrocketsure_review_notice_screens | array | Admin screens where the review request can appear |
Example: allow 10 wrong codes per minute instead of 5.
add_filter( 'giftrocketsure_apply_max_failed_attempts', function () {
return 10;
} );
Example: show the gift card field on a custom checkout page.
add_filter( 'giftrocketsure_is_checkout_page', function ( $is_checkout ) {
return $is_checkout || is_page( 'my-checkout' );
} );
Actions
| Action | Arguments | When it runs |
|---|---|---|
giftrocket_order_processed | $purchase_id, $purchase | When SureCart creates any purchase, before gift cards are issued |
giftrocket_sure_cron_frequent | none | Every 5 minutes: sends due scheduled emails |
giftrocket_sure_cron_hourly | none | Every hour: expiry reminders and cleanup |
giftrocket_sure_dispatch_single_card | $card_id | At a card’s scheduled delivery time |
Note: Add custom code in a child theme’s functions.php or a code snippets plugin, never in the GiftRocket plugin folder, so updates don’t remove it.

