Coupon Creator

  • Coupon Creator Pro
    • Coupon Creator Pro
    • Feature Demos
    • Premium Features
    • Release Notes
    • New Feature Suggestions
  • Support
    • Contact Support
    • Guides (Start Here)
    • Frequently Asked Questions
    • Documentation
    • Tutorials
    • Support Terms
  • Contact
  • My Account
  • 0 items

How to setup or troubleshoot the Recurring Expiration

Posted on 08.27.15 | brianjessee |

Knowledge Base


How to setup or troubleshoot the Recurring Expiration

Last Updated: 8 years ago in Filters,Troubleshooting Guides,User Guides,Video
In Coupon Creator Pro 2.1, a recurring expiration feature is included that enables you to set an expiration date and renew it on a set pattern. This enables you to set an expiration date at the end of the month and the expiration date changes each month to the current month’s last day. There are four (4) recurring patterns and options on how many times a coupon will recur.

Recurring Pattern
The pattern determines the time frame to renew the coupon expiration. If you select monthly and choose the last day of the month. The coupon will renew on the day after the expiration to the last day of the next month. You can select any of the patterns and it will renew the expiration date plus the pattern using a function triggered from a WordPress Cron.

  1. Monthly
  2. Weekly
  3. Biweekly
  4. Every 3 Weeks

Recurring Limit
The limit sets how many times to renew the expiration. The range is from 0 to 20 or use the unlimited option.

If you select unlimited, the coupon will renew the expiration per the pattern as long as the coupon is published.

If you select a number it renew until it hits 0, then it will expire once the expiration date is reached.

WP Cron
The expiration pattern is run by a WordPress Cron every 30 minutes. The WordPress Cron relies on visitors to your site in order to be triggered. Because of this, it may not be triggered exactly when a coupon is expired and ready to be renewed. If you would like a more precise cron, you can setup a real cron follow the steps in this article from WPDailyBits – How to Replace WordPress Cron With A Real Cron Job.

Troubleshooting WP Cron

If you are not seeing your expiration dates recur, then the first place to check on your site is all the crons and make sure it is scheduled. There is a plugin called, WP Crontrol that once installed creates a page in your admin under Tools > Crontrol that will give you a list of all the scheduled crons.

There you want to look for this hook name: cctor_pro_process_recurring_expiration.

If you do not see it, you can deactivate and reactive Pro and that should reschedule it.

If that still does not work, you can manually add the cron using the following settings:

Hook Name:
cctor_pro_process_recurring_expiration

Arguments:
None

Next run (UTC):
Now

Event schedule:
Once Every 20 Mins (20 minutes)

For the event schedule you could select another value, but Pro sets it to be every 30 minutes.

Filter Cron Interval
The default for the recurring cron is every 30 minutes and you can use the following filter to change that interval.

In this example, it creates a 5 minute interval and then filters that to the coupon creator recurring cron. You can customize this to another interval if you like. Add it to a custom plugin or your child theme’s functions.php and then deactivate and reactive Pro. You can also manually add it using the WP Crontrol Plugin too.

/*
* Custom Cron Interval
*
* @http://codex.wordpress.org/Function_Reference/wp_get_schedules
*/
add_filter( 'cron_schedules', 'cctor_cron_every_five_minutes' );
function cctor_cron_every_five_minutes( $schedules ) {
	// Adds once every 5 minutes to existing cron schedules
	$schedules['every_5mins'] = array(
		'interval' => 300,
		'display' => __( 'Every 5 Minutes' )
	);
	return $schedules;
}

/*
* Coupon Creator Pro - Custom Recurring Expiration Cron Interval
* @version 2.1
*/
add_filter('cctor_pro_recurrence_processor_interval', 'cctor_pro_custom_expiration_cron_interval' );
function cctor_pro_custom_expiration_cron_interval( $interval ) {
	//Set cron to every 5 minutes
	$interval = 'every_5mins';
	return $interval;
}

Recurring Limit Filter
Return a number using this filter to change the range:

cctor_filter_recurring_limit_amount

1 star1 star1 star1 star1 star
4.3 out of 5 stars
Downloads!

Get Started With Pro

Click to Buy Pro

What Users are Saying:


My client needed a coupon creator to add the mobile equivalent of clip-out paper coupons for their website. This Coupon Creator plugin was the best, most reliable solution that allows my client to easily make decent-to-good looking online coupons in-house with a minimum of design experience and fuss. Many other coupon plugins actually only generate coupon codes a-la RetailMeNot. This one lets you generate printable coupon-looking coupons or responsive, mobile-friendly discount coupons that users can pull up on their smartphone right there at the merchant.

— (typeadesign)

Simple Solution for My Site — First Rate Support! – A simple and useful plugin that offers a perfect solution for my website. … The videos are extremely helpful. Support from the developer was fast and very helpful…more

— Mike (msagman)

Wonderful Plugin & Top Notch Support – We purchased the pro version of this plugin after reviewing the free version for a while. The free version is great, but we needed some of the more advanced features that the pro version offered…more

— (infobeckettgraphics)

5-Star Rating All Day Long – I strongly recommend using this plugin if you EVER need a “Top Of The Line” well designed, clean coded, lightweight, easy to manage and style coupon plugin for whatever reason for your WP site….more

— Fish (fish911)

Great Support – I am using Coupon Creator fee version on two sites and love it! Easy to use and great support! Just what I was looking for.

— Kay (stahr5)

Login

  • Lost Password

Support Resources

  • Guides
  • Frequently Asked Questions
  • Documentation
  • Tutorials

Sign Up for Updates!

For the Coupon Creator Pro!

  • This field is for validation purposes and should be left unchanged.
  • Coupon Creator Pro
  • Coupon Creator
  • Guides
  • Frequently Asked Questions
  • Terms of Service
  • Privacy Policy

Copyright © 2023 Site · WordPress Web Design by Jessee Productions, LLC

7ads6x98y