WordPress.org

Ready to get started?Download WordPress

Forums

Plugin for Making Coupons (2 posts)

  1. Alanrh
    Member
    Posted 1 year ago #

    Does anyone know of a plugin that can make a coupon that can have a expiration date set to X number of days from the date they visited the page or printed the coupon. Example you visit site on April 5, 2013 and the coupon would expire in 5 days, Coupon would read "Expires: April 10, 2013".

    I've seen some that I can set the the date, but none to automatically generate the date of expiration base on current date + X number of days.

    I know this code will create the date in the future.

    <?php
    $future = mktime(0,0,0,date("m"),date("d")+14,date("Y"));
    $mydate = date("F j, Y", $future);
    echo $mydate;
    ?>

    I hope someone out there that enjoys making plugins may be able to help if their are no plugins out yet to do this.

    Thanks you
    Alan
    Website liangs-garden.com

  2. catacaustic
    Member
    Posted 1 year ago #

    I'd suggest that you look through the source code for each of the plugins that you've found, because if the plugn is written really well there's a good chance that the author will have put in a filter that will allow you to change the expiry date. Of course that's only if the author has thought of it. If they haven't then I'd think about contacting a couple and see if any of them are willing to make that sort of change. They might because I can see that it's a pretty good suggestion.

Topic Closed

This topic has been closed to new replies.

About this Topic