Support » Plugin: Expire Users » Interesting Concept

  • Hi,

    I just came across this plugin whilst looking for something else and wondered if this one might be ideal.

    I run an ads website, and as you can imagine there are many un-renewed listings.

    Would it be possible to set an expiry date for a user of SIX months, UNLESS they supply another ad listing? ie the expiry date changes to six months from their latest ad listing?

Viewing 1 replies (of 1 total)
  • Plugin Author Ben Huson

    (@husobj)

    If you are confident with a bit of PHP coding and are familiar with WordPress hooks, it would depend on whether you can hook into the code when an Ad is added and get access to the User ID of the person who added it.

    If you can then you may be able to code something similar to the following to update the expiry date (make sure you do this in a development environment to test, not your live site):

    
    // Get the user ID as $user_id and do some checks to make sure that
    // you want to update them. Are they the correct role for example?
    $e_user = new Expire_User( $user_id );
    $e_user->set_expire_time_in_future( 6, 'months' );
    
    • This reply was modified 1 year, 5 months ago by  Ben Huson.
Viewing 1 replies (of 1 total)
  • The topic ‘Interesting Concept’ is closed to new replies.