Discount Countdown
The Countdown module automatically displays a countdown to the end of the discount on products that have a rule with a time limit.
Module Activation
Section titled “Module Activation”The module is optional and must be activated in the main plugin settings under the Additional Modules section.
How It Works
Section titled “How It Works”The countdown automatically appears on a product if:
- The product has an active discount rule
- The rule has a Date condition
- Show countdown is enabled on the condition
Setting Up the Condition with Countdown
Section titled “Setting Up the Condition with Countdown”1. Create a Discount Rule
Section titled “1. Create a Discount Rule”In the rule settings, add a Date condition.
2. Set the Time Limit
Section titled “2. Set the Time Limit”| Field | Description |
|---|---|
| Date from | Start of the discount validity |
| Date to | End of the discount validity (required for countdown) |
| Show countdown | Enable to display the countdown |
3. The Countdown Appears Automatically
Section titled “3. The Countdown Appears Automatically”After saving the rule, the countdown appears on all products that match the rule conditions.
Appearance Settings
Section titled “Appearance Settings”Time Color
Section titled “Time Color”Field: Time color
Determines the color of the countdown digits.
- Default:
#ff0000(red) - Supports all CSS colors (hex, rgb, names)
Countdown Display
Section titled “Countdown Display”The countdown is displayed in the info block on the product page in the format:
DD:HH:MM:SSWhere:
- DD - days
- HH - hours
- MM - minutes
- SS - seconds
Display Example
Section titled “Display Example”20% off all products!02:14:35:22Multiple Condition Groups
Section titled “Multiple Condition Groups”If the rule has multiple condition groups (OR logic), the countdown is displayed only when:
- The entire condition group is met (AND logic within the group)
- The group contains a Date condition with an active countdown
Example:
Group 1: Date Jan 1 - Jan 31 (show countdown: YES) + Role: VIP customer
Group 2: Date Feb 1 - Feb 28 (show countdown: NO)The countdown is displayed only in January and only for VIP customers.
Technical Details
Section titled “Technical Details”- The countdown uses JavaScript for real-time updates
- Updates every second
- Automatically hides when the time expires
- Uses server time (not the browser’s local time)
CSS Customization
Section titled “CSS Customization”The countdown has a CSS class for custom styling:
.wpify-woo-discount-countdown { /* Countdown wrapper */}
.wpify-woo-discount-countdown span { /* The countdown number itself */ font-size: 2rem; color: var(--countdown-color, #ff0000);}Frequently Asked Questions
Section titled “Frequently Asked Questions”The countdown is not displaying even though I have a Date condition set
Check:
- Is the Countdown module activated in settings?
- Is Show countdown enabled on the Date condition?
- Is Date to filled in? (required for countdown)
- Are all other conditions in the group met?
Can I have a countdown without a date condition?
No. The countdown requires a Date condition with an end date. Without it, there would be nothing to count down to.
Does the countdown appear on the cart page?
No. The countdown is displayed only on the product page within the info block.