Community Support Forums — WordPress® ( Users Helping Users ) — 2011-10-10T14:29:57-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=15485 2011-10-10T14:29:57-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15485&p=45267#p45267 <![CDATA[Re: outputting end of term]]> automatic EOT's configuration file under s2member folder\s2member\includes\classes -> in the file auto-eots.inc.php.

And here's the link to the s2Member codex documentation about automatic EOT's:
viewtopic.php?f=40&t=12484&src_doc_v=111003
viewtopic.php?f=40&t=12481&src_doc_v=111003

Hope this helps :) .

Statistics: Posted by Eduan — October 10th, 2011, 2:29 pm


]]>
2011-10-10T10:04:31-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15485&p=45250#p45250 <![CDATA[outputting end of term]]>
Code:
function ASH_expiry_func( $atts ) {
   $ts=get_user_field ("s2member_auto_eot_time");//EOT set manually
   if(!$ts){
      $ts=get_user_field(s2member_last_payment_time);//user paid by PayPal
      if(current_user_can('administrator')){//admin will have no $ts
         return 'n/a';
      } else{
         $eot=new DateTime("@$ts");
         $eot->modify('+1 year');
      }
   } else {
      $eot = date_create("@$ts");
   }
   
   return $eot->format('Y-m-d');
}
add_shortcode( 'ASH_expiry', 'ASH_expiry_func' );


But I have a feeling that s2member has something that already does the above. I just can't find it. Is there such a thing, and if there is not, am I using the correct fields in my function?

Thanks,
Jen

Statistics: Posted by halifaxious — October 10th, 2011, 10:04 am


]]>