WordPress Shortcodes: Expiration Date

Discussion in 'aMember Pro v.4' started by tech-support@skhquest.com, Oct 20, 2012.

  1. tech-support@skhquest.com

    tech-support@skhquest.com New Member

    Joined:
    Nov 13, 2007
    Messages:
    6
    I needed the ability to show the member's expiration date on a WordPress page, and I use the amember WordPress plugin that is provided. Long story short, if you need the ability to show a user's expiration date in a WordPress shortcode, look for the following line of code in your wp-content/plugins/amember4/shortcodes.php file. In my case it was line 106:

    case 'name' : $ret = $user['name_f']." ".$user['name_l']; break;
    Insert the following line beneath that:
    case 'expires' : $ret = am4PluginsManager::getAPI()->getExpire(); break;
    Now, much in the same way you can use the shortcode [am4user var='name'] you can use [am4user var='expires'].
    I hope this helps others who have this need.
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Hi,
    Thanks for the suggestion!
    We have added this to plugin.

Share This Page