Viewing 11 replies - 1 through 11 (of 11 total)
  • A product is a type of post, so this plugin should do the job:
    https://www.ads-software.com/plugins/post-expirator/

    After activation, go to the relevant product page and look for the Post Expirator section, where you can set the expiry date.

    Thread Starter daniish

    (@daniish)

    Hi Lorro,

    Thanks the post-expirator plugin is just what i was looking for!

    Unfortunately, it is no longer supported and it doesn’t seem to work with 4.1.1, so i’m need to find an alternative. Any ideas?

    Um, yes I see that some people say it doesn’t work but there will always be a few people that will say that about any plugin. Every website’s setup is a bit different. But down at the bottom of the plugin page there are 4 people that say it works with WP 4.1.1 and 0 that say it doesn’t.

    It loaded up OK for me but I didn’t do an expiration test as that takes a while. In what way doesn’t it work for you? Maybe it can be tweaked.

    There are several more expiration plugins here to try:
    https://www.ads-software.com/plugins/search.php?q=post+expiry
    https://www.ads-software.com/plugins/search.php?type=term&q=post+expiration

    If you are willing to pay for something you could ask here:
    https://www.woothemes.com/contact-us/#sales-form
    I can’t see anything suitable in their extensions but they will know better.

    Thread Starter daniish

    (@daniish)

    Hi Lorro,

    Thanks for getting back to me. This plugin does exactly what i need so it would be awesome if i can get it working on my site.

    I’m glad to hear that others have it working for 4.1.1 so perhaps it can be tweaked.

    I have tested the plugin by adding an expiry date to a woocommerce product that i set to expire (delete) on the 1st March:
    https://www.willowgalleryoswestry.org/product/march-2015/

    Similarly, i set the following post to expire on the 10th April and it is also still visible:
    https://www.willowgalleryoswestry.org/colour-exploration/

    However, as you can see it is still visible. do you have any suggestions?

    I’ve had a look. I set a past date on a product and the product was still visible in the browser, though when I navigated away from it and tried to come back I was not able to.

    Try another test, set a product to expire 5 minutes into the future. Note the post id from the url. Go to Admin page > Settings > Post Expirator > Diagnostics & ensure WP-Cron status = Enabled OK. Also look down the list for a “postExpiratorExpire” event where the post id matches the product id and the time is given. Wait for the expiry time. The product is still in the browser window and will show if you refresh the window, but not if you navigate away and try to navigate back. There is no “postExpiratorExpire” event for an expiry date in the past.

    Do you get auto update notifications for WP, theme and plugins? If so it is likely that CRON is enabled on your system.

    Thread Starter daniish

    (@daniish)

    Hi Lorro,

    Thanks again for your help with this.

    OK so i set the following post (post_id 3476) to expire at 15:53 today:
    https://www.willowgalleryoswestry.org/colour-exploration/

    It did not expire and is still visible despite navigating away from the site.

    In the Post Expirator Diagnostics tab i have just searched for the post_id 3476 and here is what it says:

    Tue, 14 Apr 2015 14:53:00 +0000 postExpiratorExpire 0 => 3476 Single Event

    According to the Post Expirator plugin CRON is enabled, however, i note that the standard plugins that bundle with wordpress: WP-Cron Control and WP Control are not Activated. When i activate these plugins, they disable CRON in the Post Expirator plugin.

    So what would you suggest i try next?

    Thread Starter daniish

    (@daniish)

    I have activated WP Control and notice that i have a problem:

    There was a problem spawning a call to the WP-Cron system on your site. This means WP-Cron jobs on your site may not work. The problem was:
    Failure when receiving data from the peer

    What does this mean and how do i fix this?

    Thread Starter daniish

    (@daniish)

    Seem to have fixed that error by adding:

    define( ‘ALTERNATE_WP_CRON’, true );

    to wp-config.php

    but main problem still persists, hope you can help?

    Thread Starter daniish

    (@daniish)

    Now it seems to be working! Yipee ??

    Perhaps i just need to decrease the cron interval to make the changes occur quicker on the website. If you think that sounds plausible perhaps you can explain how to do this?

    It looks like a separate once-only postExpirator cron job is set for each post where an expiry date has been set. These cron jobs don’t have an interval.

    Thread Starter daniish

    (@daniish)

    Brilliant. Yes it seems to be working properly today.

    Lorro thank you ever so much for your help, its much appreciated!!!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Product Expiry Date’ is closed to new replies.