DealPulse Developer Hooks

The most important thing developers want to know is:

  • How to change timer text?
  • How to change timer HTML?
  • How to create a completely custom timer template?
  • How to add CSS classes?
  • How to change discount values?
  • How to customize dynamic tag output?

Timer Customization

DealPulse provides several filters that allow developers to customize the countdown timer output without overriding plugin files.

Change Complete Timer HTML

Filter

wpext_dealpulse_timer_html

Description

Allows you to replace the entire timer markup before it is rendered.

Example

add_filter(
    'wpext_dealpulse_timer_html',
    function ( $html, $campaign ) {

        return sprintf(
            '<div class="my-custom-timer">%s</div>',
            $html
        );

    },
    10,
    2
);

Use Cases

  • Wrap timer in custom HTML
  • Add icons
  • Create custom layouts
  • Integrate with page builders

Change Timer Text

Filter

wpext_dealpulse_timer_full_text

Description

Allows modification of the complete timer message.

Default Output

Offer Ends In:

Example

add_filter(
    'wpext_dealpulse_timer_full_text',
    function ( $text ) {

        return 'Flash Sale Ends In';

    }
);

Result

Flash Sale Ends In

Add Content Before Timer

Filter

wpext_dealpulse_timer_before_text

Example

add_filter(
    'wpext_dealpulse_timer_before_text',
    function () {

        return '🔥';

    }
);

Output

🔥 Flash Sale Ends In

Add Content After Timer

Filter

wpext_dealpulse_timer_after_text

Example

add_filter(
    'wpext_dealpulse_timer_after_text',
    function () {

        return 'Hurry Up!';
    }
);

Output

Offer Ends In Hurry Up!

Add Custom CSS Classes

Filter

wpext_dealpulse_timer_wrap_class

Description

Add custom classes to the timer wrapper.

Example

add_filter(
    'wpext_dealpulse_timer_wrap_class',
    function ( $classes ) {

        $classes .= ' my-custom-timer pulse-animation';

        return $classes;

    }
);

Output

<div class="dealpulse-timer my-custom-timer pulse-animation">

Creating a Custom Timer Design

There are two recommended approaches.

Method 1: CSS Styling

Keep the existing timer HTML and customize the design with CSS.

.my-custom-timer {
    background: #111;
    color: #fff;
    padding: 15px;
    border-radius: 8px;
}

.my-custom-timer .dp-time {
    font-size: 28px;
    font-weight: 700;
}

Recommended when:

  • Only changing colors
  • Changing typography
  • Changing spacing
  • Adding animations

Method 2: Replace Entire Timer Template

Use:

wpext_dealpulse_timer_html

to return your own HTML structure.

Example

add_filter(
    'wpext_dealpulse_timer_html',
    function ( $html, $campaign ) {

        ob_start();
        ?>

        <div class="my-flash-sale-timer">

            <div class="headline">
                Flash Sale
            </div>

            <div class="counter">
                <?php echo $html; ?>
            </div>

        </div>

        <?php

        return ob_get_clean();

    },
    10,
    2
);

This allows developers to build:

  • Card-style timers
  • Banner timers
  • Sticky timers
  • Floating timers
  • Full-width promotional bars

Dynamic Tag Output

Filter

wpext_dealpulse_dynamic_tag_output

Description

Modify the rendered value of any merge tag.

Example

add_filter(
    'wpext_dealpulse_dynamic_tag_output',
    function ( $output, $tag ) {

        if ( 'product_name' === $tag ) {
            return '🔥 ' . $output;
        }

        return $output;

    },
    10,
    2
);

Result

🔥 Woo Hoodie

Filter Specific Dynamic Tags

Filter

wpext_dealpulse_dynamic_tag_output_product_name

Example

add_filter(
    'wpext_dealpulse_dynamic_tag_output_product_name',
    function ( $output ) {

        return strtoupper( $output );

    }
);

Result

WOO HOODIE

Discount Customization

Filter

wpext_dealpulse_discounted_price

Description

Modify the final calculated discount before it is displayed.

Example

add_filter(
    'wpext_dealpulse_discounted_price',
    function ( $price, $product ) {

        if ( current_user_can( 'wholesale_customer' ) ) {
            return $price * 0.9;
        }

        return $price;

    },
    10,
    2
);

Use Cases

  • Wholesale pricing
  • VIP discounts
  • Member discounts
  • Custom pricing logic

Campaign Lifecycle Actions

These hooks allow developers to react when campaigns start, finish, or inventory changes.

Campaign Started

wpext_dealpulse_campaign_started

Trigger notifications, analytics events, or external webhooks.


Campaign Finished

wpext_dealpulse_after_campaign_finished

Trigger reports, cleanup tasks, or post-campaign automations.


Inventory Sold Out

wpext_dealpulse_product_inventory_sold_out

Useful for:

  • Sending emails
  • Pausing ads
  • Triggering restock workflows

Inventory Updated

wpext_dealpulse_inventory_updated

Useful for syncing inventory counters with external systems.