Skip to navigation Skip to main content
Smart Cycle Discounts is now available on WordPress.org — Download Free
🎉 SCD is now available — Download Free
  • WordPress
    WordPress Plugins
    View all
    Smart Cycle Discounts A cycling discount mark: rotating arrows around a center badge that cycles commerce icons.

    Smart Cycle Discounts

    Automate discount campaigns with scheduling, analytics, and smart product targeting.

    5 Discount Types Recurring Campaigns
    Free Pro from $59

    TrustLens

    Customer trust intelligence for WooCommerce. Score customers, spot abuse, protect revenue.

    Trust Scores Abuse Detection
    Free Pro from $79

    New Plugin

    Coming Soon

    Something exciting is in the works. Join the waitlist to be first to know.

    Get Notified
    Notify Me
    Secure Checkout
    WordPress.org
    14-Day Refund
    Resources
    Documentation Guides & tutorials
    Discount Calculator Plan your strategy
    Support Get help
    Changelog What's new
    Get notified on new releases
  • Affiliate
  • Blog
  • DOCS
    Documentation

    Choose a plugin to explore its documentation

    Smart Cycle Discounts Automated discount campaigns for WooCommerce
    Available
    New Plugin Something exciting is in development
    Coming Soon
    New Plugin Something exciting is in development
    Coming Soon
    Docs Home FAQ Get Support
    WordPress tools that solve real problems
  • Contact Us
  • About
    Company

    Our Story

    Founded 2020

    Built by store owners, for store owners. We create WordPress tools that solve real problems.

    Learn more
    Built from Experience Real solutions we use ourselves
    Time is Precious Simple, intuitive tools
    Real Support Talk to the founders
    Legal & Contact
    Contact Us Privacy Policy Terms of Service Refund Policy
    14-Day Money-Back Guarantee No questions asked
GET STARTED

Getting Started

5
  • What is Smart Cycle Discounts?
  • Installation Guide
  • Creating Your First Campaign
  • Plugin Dashboard Overview
  • Free & Pro Features

Campaign Wizard

7
  • Campaign Wizard Overview
  • Step 1 – Basic Information
  • Step 2 – Product Selection
  • Step 3 – Discount Configuration
  • Step 4 – Campaign Scheduling
  • Step 5 – Review & Launch
  • Campaign Health Scoring

Product Selection

5
  • All Products Mode
  • Specific Products Mode
  • Random Products Mode
  • Smart Selection Mode
  • Product Search Tips

Discount Types

7
  • Percentage Discounts
  • Fixed Amount Discount
  • Buy One Get One (BOGO)
  • Tiered Volume Pricing
  • Spend Threshold Discounts
  • Bundle Discounts
  • Discount Stacking and Priority

Scheduling

5
  • Setting Campaign Dates
  • Timezone Configuration
  • Recurring Campaigns
  • Campaign Status Explained
  • Automatic Activation

Campaign Management

6
  • Campaign List
  • Editing Existing Campaigns
  • Duplicating Campaigns
  • Bulk Actions
  • Campaign Priority System
  • Campaign Overview Panel

Developer Documentation

5
  • Hooks and Filters Reference
  • Rest API Overview
  • Custom Discount Integration
  • Template Customization
  • Database Schema

Troubleshooting

6
  • Campaign Not Activating
  • Discounts Not Displaying
  • Scheduling Issues
  • Product Search Not Working
  • Performance Optimization
  • Common Error Messages

FAQ

3
  • General
  • Compatibility
  • Pricing & Licensing

Notifications

5
  • Email Provider Setup
  • Email Notifications Setup
  • Basic Notifications
  • Proactive Alerts
  • Low Stock Alerts

Setting Configuration

5
  • General Settings
  • Display Settings
  • Advanced Settings
  • Tools and Diagnostics
  • License Management

Use Cases

7
  • Flash Sale Campaign
  • Seasonal Sale Campaign
  • Weekend Sale Recurring
  • BOGO Promotion
  • Volume Discount Campaign
  • Cart Threshold Promotion
  • Bundle Discount Campaign
View Categories
  • Home
  • Docs
  • Smart Cycle Discounts
  • Developer Documentation
  • Template Customization

Template Customization

4 min read

Smart Cycle Discounts uses template files for rendering certain UI elements. This guide explains how to customize these templates in your theme to match your store’s design.


Template Override System #

How Template Overrides Work #

Smart Cycle Discounts follows the WordPress/WooCommerce template override pattern:

  1. Plugin checks your theme for template file
  2. If found in theme, uses theme version
  3. If not found, uses plugin default

Override Location #

Place custom templates in your theme:

your-theme/
└── smart-cycle-discounts/
    └── [template-file.php]

Or in a child theme:

your-child-theme/
└── smart-cycle-discounts/
    └── [template-file.php]

Available Templates #

Frontend Templates #

Template Location Description
sale-badge.php frontend/ Product sale badge
savings-message.php frontend/ “You save X” message
price-display.php frontend/ Price with original/sale format
cart-discount.php frontend/ Cart discount row

Email Templates #

Template Location Description
campaign-expiring.php emails/ Expiration warning email
campaign-activated.php emails/ Activation notification
low-stock-alert.php emails/ Low stock warning (Pro)

Creating Template Overrides #

Step 1: Copy Original Template #

  1. Find the template in wp-content/plugins/smart-cycle-discounts/templates/
  2. Copy to your theme’s smart-cycle-discounts/ folder
  3. Maintain the same folder structure

Step 2: Customize Template #

Edit the copied file. Available variables are documented in each template.

Step 3: Clear Cache #

After changes, clear any page cache to see updates.


Template Examples #

Custom Sale Badge #

File: your-theme/smart-cycle-discounts/frontend/sale-badge.php

<?php
/**
 * Custom Sale Badge Template
 *
 * Available variables:
 * $product_id  - Product ID
 * $campaign    - Campaign object
 * $discount    - Discount percentage or amount
 * $badge_text  - Default badge text
 */

if ( ! defined( 'ABSPATH' ) ) {
    exit;
}
?>

<div class="custom-sale-badge">
    <span class="badge-text"><?php echo esc_html( $badge_text ); ?></span>
    <span class="badge-discount">-<?php echo esc_html( $discount ); ?>%</span>
</div>

Custom Savings Message #

File: your-theme/smart-cycle-discounts/frontend/savings-message.php

<?php
/**
 * Custom Savings Message Template
 *
 * Available variables:
 * $savings_amount     - Amount saved
 * $savings_percentage - Percentage saved
 * $original_price     - Original price
 * $sale_price         - Sale price
 */

if ( ! defined( 'ABSPATH' ) ) {
    exit;
}
?>

<div class="custom-savings">
    <strong>Your Discount:</strong>
    <span class="amount"><?php echo wc_price( $savings_amount ); ?></span>
    <span class="percent">(<?php echo esc_html( round( $savings_percentage ) ); ?>% off)</span>
</div>

Custom Price Display #

File: your-theme/smart-cycle-discounts/frontend/price-display.php

<?php
/**
 * Custom Price Display Template
 *
 * Available variables:
 * $original_price - Original price (float)
 * $sale_price     - Discounted price (float)
 * $product_id     - Product ID
 * $campaign_name  - Name of the campaign
 */

if ( ! defined( 'ABSPATH' ) ) {
    exit;
}
?>

<div class="custom-price-display">
    <span class="was-price">
        Was: <del><?php echo wc_price( $original_price ); ?></del>
    </span>
    <span class="now-price">
        Now: <strong><?php echo wc_price( $sale_price ); ?></strong>
    </span>
</div>

CSS Customization #

Default CSS Classes #

The plugin adds these CSS classes you can target:

Class Element
.wsscd-discount-badge Sale badge container
.wsscd-original-price Original price (strikethrough)
.wsscd-sale-price Discounted price
.wsscd-savings-message Savings display
.wsscd-price-wrapper Price container
.wsscd-cart-discount Cart discount row

Adding Custom CSS #

Option 1: Theme Customizer

  1. Go to Appearance → Customize → Additional CSS
  2. Add your custom CSS

Option 2: Theme Stylesheet

/* In your theme's style.css or custom CSS file */

.wsscd-discount-badge {
    background: #ff4444;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
}

.wsscd-savings-message {
    color: #28a745;
    font-size: 0.9em;
    margin-top: 5px;
}

Option 3: Display Settings

Use the custom CSS field in SC Discounts → Settings → Display.


JavaScript Customization #

JavaScript Events #

The plugin emits namespaced events. Common ones:

// Fired when dynamic content/DOM is refreshed.
$( document ).on( 'wsscd:content-updated', function() {
    console.log( 'Re-bind custom UI after plugin refresh.' );
} );

// Fired when a frontend countdown/offer expires.
$( document.body ).on( 'wsscd_discount_expired', function( e, $element ) {
    console.log( 'Discount expired for element:', $element );
} );

// Wizard event (admin).
$( document ).on( 'wsscd:wizard:stepLoaded', function( e, stepName ) {
    console.log( 'Wizard step loaded:', stepName );
} );

Modifying Display via JavaScript #

jQuery( function( $ ) {
    // Re-apply custom behavior after plugin-driven content updates.
    $( document ).on( 'wsscd:content-updated', function() {
        $( '.wsscd-discount-badge' ).addClass( 'is-enhanced' );
    } );
} );

Template Variables Reference #

Campaign Object #

When $campaign is available:

$campaign->get_id();           // Campaign ID
$campaign->get_name();         // Campaign name
$campaign->get_status();       // Status string
$campaign->get_discount_type(); // 'percentage' or 'fixed'
$campaign->get_discount_value(); // Discount amount
$campaign->get_priority();     // Priority level
$campaign->get_start_date();   // Start datetime
$campaign->get_end_date();     // End datetime

Price Variables #

$original_price    // Float: Original product price
$sale_price        // Float: Discounted price
$savings_amount    // Float: Amount saved
$savings_percentage // Float: Percentage saved

Product Variables #

$product_id        // Integer: WooCommerce product ID
$product           // WC_Product object (when available)

Email Template Customization #

Custom Email Template #

File: your-theme/smart-cycle-discounts/emails/campaign-expiring.php

<?php
/**
 * Campaign Expiring Email Template
 *
 * Available variables:
 * $campaign       - Campaign object
 * $days_remaining - Days until expiration
 * $site_name      - WordPress site name
 * $admin_url      - URL to campaign in admin
 */

if ( ! defined( 'ABSPATH' ) ) {
    exit;
}
?>

<!DOCTYPE html>
<html>
<head>
    <style>
        body { font-family: Arial, sans-serif; }
        .header { background: #f8f9fa; padding: 20px; }
        .content { padding: 20px; }
        .button { background: #0073aa; color: white; padding: 10px 20px; text-decoration: none; }
    </style>
</head>
<body>
    <div class="header">
        <h1>Campaign Expiring Soon</h1>
    </div>
    <div class="content">
        <p>Your campaign "<?php echo esc_html( $campaign->get_name() ); ?>"
           will expire in <?php echo esc_html( $days_remaining ); ?> days.</p>

        <p><a href="<?php echo esc_url( $admin_url ); ?>" class="button">View Campaign</a></p>
    </div>
</body>
</html>

Best Practices #

Do’s #

  • Always escape output with esc_html(), esc_attr(), etc.
  • Check if variables exist before using
  • Use WordPress/WooCommerce functions where possible
  • Test in multiple browsers
  • Keep templates minimal and focused

Don’ts #

  • Don’t modify plugin files directly
  • Don’t include business logic in templates
  • Don’t hardcode URLs or IDs
  • Don’t forget to clear cache after changes

Updating After Plugin Updates #

When the plugin updates:

  1. Check changelog for template changes
  2. Compare your templates with updated originals
  3. Merge any new functionality into your overrides
  4. Test thoroughly after merging
Updated on February 17, 2026

What are your Feelings

  • Happy
  • Normal
  • Sad

Share This Article :

  • Facebook
  • X
  • LinkedIn
  • Pinterest
Custom Discount IntegrationDatabase Schema
Table of Contents
  • Template Override System
    • How Template Overrides Work
    • Override Location
  • Available Templates
    • Frontend Templates
    • Email Templates
  • Creating Template Overrides
    • Step 1: Copy Original Template
    • Step 2: Customize Template
    • Step 3: Clear Cache
  • Template Examples
    • Custom Sale Badge
    • Custom Savings Message
    • Custom Price Display
  • CSS Customization
    • Default CSS Classes
    • Adding Custom CSS
  • JavaScript Customization
    • JavaScript Events
    • Modifying Display via JavaScript
  • Template Variables Reference
    • Campaign Object
    • Price Variables
    • Product Variables
  • Email Template Customization
    • Custom Email Template
  • Campaign Expiring Soon
    • Best Practices
      • Do's
      • Don'ts
    • Updating After Plugin Updates
Newsletter

Insights that grow your business

Join thousands of WooCommerce store owners who get actionable tips, plugin updates, and industry news every week.

We respect your privacy. Unsubscribe at any time.

Weekly updates — Fresh content every Tuesday
Exclusive content — Tips you won't find on our blog
Early access — Be first to know about new plugins
Webstepper
Weekly WooCommerce Tips
Just now
This week: 5 proven strategies to boost your average order value using smart discount campaigns...
New issue!
Webstepper

Tools for store owners who'd rather grow than grind.

Simple, powerful plugins that help WooCommerce store owners sell more — without the learning curve.

500+ happy stores

Products

  • Smart Cycle Discounts
  • Pricing
  • Documentation
  • Changelog

Company

  • About Us
  • Blog
  • Contact
  • Affiliates

Resources

  • Help Center
  • Guides
  • Roadmap
  • Status

Questions? We actually answer.

Real humans, real help. No bots, no runaround. Usually within a few hours.

Get in touch

© 2026 Webstepper. All rights reserved.

Privacy Terms Refunds
Visa Mastercard PayPal Apple Pay Google Pay & more
  • WordPress
    Back
    WordPress Plugins
    View all
    Smart Cycle Discounts A cycling discount mark: rotating arrows around a center badge that cycles commerce icons.

    Smart Cycle Discounts

    Automate discount campaigns with scheduling, analytics, and smart product targeting.

    5 Discount Types Recurring Campaigns
    Free Pro from $59

    TrustLens

    Customer trust intelligence for WooCommerce. Score customers, spot abuse, protect revenue.

    Trust Scores Abuse Detection
    Free Pro from $79

    New Plugin

    Coming Soon

    Something exciting is in the works. Join the waitlist to be first to know.

    Get Notified
    Notify Me
    Secure Checkout
    WordPress.org
    14-Day Refund
    Resources
    Documentation Guides & tutorials
    Discount Calculator Plan your strategy
    Support Get help
    Changelog What's new
    Get notified on new releases
  • Affiliate
  • Blog
  • DOCS
    Back
    Documentation

    Choose a plugin to explore its documentation

    Smart Cycle Discounts Automated discount campaigns for WooCommerce
    Available
    New Plugin Something exciting is in development
    Coming Soon
    New Plugin Something exciting is in development
    Coming Soon
    Docs Home FAQ Get Support
    WordPress tools that solve real problems
  • Contact Us
  • About
    Back
    Company

    Our Story

    Founded 2020

    Built by store owners, for store owners. We create WordPress tools that solve real problems.

    Learn more
    Built from Experience Real solutions we use ourselves
    Time is Precious Simple, intuitive tools
    Real Support Talk to the founders
    Legal & Contact
    Contact Us Privacy Policy Terms of Service Refund Policy
    14-Day Money-Back Guarantee No questions asked