All 20 Countdown Timer sections

See every section

A coupon that works only while the countdown runs

Updated Countdown Timer 1.12.0Tested with WordPress 7.1

Campaigns → a campaign → Countdown → Coupon that works only while this runs. It is offered while WooCommerce is active, for Fixed date and time and Fixed length per visitor. Type the coupon's code: the shop's own codes are suggested as you type, and nothing is chosen by number. Once the campaign is saved, the line under the field spells out the window the code works in, in your site's time zone.

WooCommerce's own expiry date ends a coupon at midnight. A code linked here ends with the countdown, to the minute:

  • Fixed date and time. Before the Start date and time, the code is refused with "This code works from …", with the date and time as your site writes them. From the End date and time, it is refused with "This offer has ended." A campaign with no end date refuses it.
  • Fixed length per visitor. The code works only while that visitor's own countdown runs, measured by your site's clock from the start the visitor's browser recorded. A visitor who has never been shown the timer has no countdown, so the code is refused. On a campaign that repeats daily or weekly, a countdown that started before midnight, or before Monday, keeps the code working until it ends, as the timer on the visitor's screen does. The timer on screen goes by the visitor's device, so on a device whose clock is wrong the code can end earlier or later than the timer shows, by up to as much as the clock is out. A start more than five minutes ahead of your site's clock does not count, so a cookie edited to name a later start has the code refused. A device whose clock is more than five minutes fast records such a start too: the code is refused until your site's clock is within five minutes of it, and then works for the campaign's length from that start, which ends after the timer on that screen. A per-visitor code is only as strong as the per-visitor timer: a visitor who clears their cookies, or comes back on another device, starts both again.

The check is WooCommerce's own coupon check, so it covers the classic cart and checkout and the Cart and Checkout blocks alike, and it runs only when WooCommerce checks a coupon. A code already on a cart when the countdown ends is taken off at the checkout, with WooCommerce's own notice and the new total, before any payment. WooCommerce's own rules for the coupon, such as its expiry date, usage limits and minimum spend, still apply as well.

While the campaign is switched off, or every campaign is switched off under Settings, the code is refused: it was linked to work only while the countdown runs. Switched on again inside its window, it works again. Staff who can edit orders are not refused when they add the code to an order by hand, in wp-admin or through the REST API. At the shop's own cart, including a side cart or a one-page checkout, they are refused like anyone.

Changing which coupon a campaign works with needs WooCommerce's own right to edit coupons, which administrators and shop managers have. Somebody let in only by a role editor plugin (see Who can manage campaigns) sees the campaign's code in the editor, and cannot change it.

A code belongs to one campaign. Linking a code that another campaign already has is refused, and so is the code the cart timer is applying, while the cart timer is switched on with that coupon as its Discount. The message after saving says why, and names the code the campaign keeps, if it had one. The code is kept as you typed it, 25%DEAL included. The other way round, a campaign's code typed as the cart timer's coupon is saved, and the Cart Timer screen says which campaign links it: the cart timer can apply it only while that campaign runs. A copy made with Duplicate has no coupon. A campaign changed to count to a product's sale date or a daily or weekly cut-off keeps its code, and the code is refused until the campaign counts to a fixed date or a length per visitor again.

Show the code on the timer adds a "Use code BF20" line with a Copy button under the heading. The button can be reached and pressed from the keyboard, and a screen reader hears that the code was copied. The line is not shown in shop listings, and it goes when the timer reaches zero. It shows only while the coupon is published in WooCommerce. When the coupon's code is changed, or the coupon is unpublished, put in the bin or deleted, the plugin empties the page caches it knows, so a cached page does not go on showing the old code.

The Campaigns list says when each linked code works: until when on a fixed date, or while each visitor's countdown runs on a per-visitor campaign, and from when as well while the campaign is still to start. Otherwise it says the code is refused: while the campaign is not running, until it has an end date, or, for a campaign changed to count to a product's sale date or a daily or weekly cut-off, unless it counts to a fixed date or a length per visitor. In WooCommerce, Marketing → Coupons has a Countdown column, and the coupon's own General panel names the campaign, linked to it.

Deleting a campaign with a coupon asks first, naming the code. Once it is deleted, the code follows only WooCommerce's own settings. While the plugin is deactivated, every linked code does the same.

Still stuck? Ask the developers who wrote it. We aim to reply within one business day.