Zum Inhalt springen

Configuration

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Ticker works out of the box with sensible defaults, so configuration is optional. Everything lives on one screen, WooCommerce → Ticker, and is stored as a single array in the ticker_settings option. The fields fall into three groups: when the countdown runs, how it reads, and where it appears.

On by default (enabled). The master switch, when off, no countdown is rendered anywhere and no front-end styles or scripts load.

Where the end time comes from (source). Two choices:

  • WooCommerce sale end date (sale, the default), reads each product’s native Sale price dates → To value. A product must be on sale and have a To date; without one, the timer falls back to the campaign date below.
  • Fixed campaign end date (campaign), ignores per-product sale dates and counts every product down to the one store-wide date.

The end moment is resolved on the server as a fixed UTC timestamp; the browser only formats the remaining time, so a visitor’s misconfigured clock cannot change the actual end time.

A datetime-local field (campaign_end) interpreted in your site timezone, the settings screen shows that timezone next to the field. The stored value must match the YYYY-MM-DDTHH:MM shape; anything else is discarded on save. It is the primary end time when source is Fixed campaign end date, and the fallback when source is the sale date and a product has no sale end of its own.

Optional copy shown directly above the timer (heading). Leave it blank to render just the clock.

How the remaining time is displayed (format):

  • Days : Hours : Minutes : Seconds (dhms, the default), e.g. 02 : 18 : 45 : 09.
  • Hours : Minutes : Seconds (hms), folds whole days into hours, e.g. 18 : 45 : 09.
  • Hours : Minutes (compact) (compact), drops the seconds for a calmer look on multi-day campaigns, e.g. 18 : 45.

The settings screen previews the chosen format live, next to Looks like:.

Shown in place of the clock once the countdown reaches zero (expired_message). Leave it blank to use the built-in default, This sale has ended.

Where the timer is inserted on the single product page (placement). Each option maps to a WooCommerce action hook:

OptionHook (priority)
Product summary (below price), defaultwoocommerce_single_product_summary (25)
Before the add-to-cart formwoocommerce_before_add_to_cart_form (10)
After the add-to-cart formwoocommerce_after_add_to_cart_form (10)
Product meta areawoocommerce_product_meta_start (5)

A few behaviours are deliberately not settings, because they keep the timer correct:

  • Nothing renders when there is no end time to resolve (no sale end and no campaign date), Ticker hides rather than printing an empty shell.
  • A configured-but-expired countdown still renders, showing the expired message.
  • The end time is always a server-resolved UTC timestamp; there is no client-side date entry.

The timer is themed entirely through --ticker-* CSS custom properties on the .ticker element, the ember accent (--ticker-ember), foreground and muted text, surface and box colours, radius (--ticker-radius) and gap (--ticker-gap). Override them from your theme stylesheet to restyle without touching markup. Dark-mode tokens are applied automatically under prefers-color-scheme: dark, and the seconds-dial tick animation is dropped under prefers-reduced-motion: reduce (the draining ring stays, since it carries information).

To change the markup itself, copy the template into your theme at yourtheme/ticker/single-product/countdown.php and edit it there. The loader checks the theme path first and falls back to the plugin’s copy, so your override survives plugin updates.

Settings live in wp_options only, Ticker creates no custom tables and no per-product meta. Deleting the plugin runs the uninstall routine, which removes the ticker_settings and ticker_db_version options, leaving the database clean.

The ticker/end_timestamp filter overrides the resolved end time. Return an integer Unix timestamp (UTC) to force an end moment, or null to suppress the countdown for a product:

add_filter( 'ticker/end_timestamp', function ( $ts, $product, $settings ) {
// End a specific product's countdown at a custom moment.
if ( $product->get_id() === 123 ) {
return strtotime( '2026-12-01 09:00:00' );
}
return $ts;
}, 10, 3 );

The ticker/template/args and ticker/template/path filters let you adjust the template’s variables or resolved path before rendering.