HurryTimer
  • Introduction
  • Getting Started
    • Installation
    • Creating a one-time campaign
    • Creating an evergreen campaign
    • Creating a recurring campaign
    • Setting an expiry action
    • Adding a countdown timer to the product page
    • Customize the countdown timer appearance
    • Adding headline
    • Adding a call to action button
    • Displaying countdown timer in sticky bar
    • FAQ
    • Billing
  • Developer documentation
  • Expiry Actions
    • Expire a coupon
  • Appearance
    • Custom CSS
  • Troubleshooting
    • My Evergreen timer is not working properly
    • Invalid license key error message
Powered by GitBook
On this page
  • Hooks
  • Javascript Events

Was this helpful?

Developer documentation

To extend HurryTimer functionalities, different WordPress hooks and Javascript events are added to the plugin.

Hooks

do_action('hurrytimer_init');

Fires after HurryTimer has finished loading .

do_action( "hurryt{campaign_id}_campaign_ended", HurryTimer\Campaign $campaign);Fires after one-time or recurring timer has reached zero.

$campaign: The (HurryTimer\Campaign) instance

apply_filters('hurryt_show_campaign', bool $can_show);

Filters whether to show the campaign.

$can_show: (bool) Whether the campaign should be shown.

apply_filters('sticky_bar_hide_timeout', int $delay);

Filters how long to wait before reopening a dismissed sticky bar.

$delay: (int) Number of days. Default 7.

Javascript Events

hurryt:finished: Fires after timer has reached zero.

Example:

$('.hurrytimer-campaign').on('hurryt:finished', function(event, campaign){
 // campaign.id: the campaign ID
 // campaign.mode: one_time, recurring, or evergreen.
});

PreviousBillingNextExpire a coupon

Last updated 5 years ago

Was this helpful?