php - MemberMouse Registration Date plus 24 hours -
i working on membermouse subscription wordpress website. on specific user page, need display time of registration date plus 24 hours. example, if registration date is: jul 24, 2017 12:34 pm, want display: jul 25, 2017 12:34 pm.
<?php $datee= date("f j, y g:i a", strtotime("[mm_member_data name='registrationdate']+ 10 hours")); ?> access until: <?php echo $datee; ?> by way, smarttag "[mm_member_data name='registrationdate']" gives out example: jul 24, 2017 12:34 pm.
i tried above code registration date, getting error.
any solution problem appreciated.
thanks,
aron
the simplest code , keep original idea of processing shortcode inline.
<?php $datee= date("f j, y g:i a", strtotime(do_shortcode("[mm_member_data name='registrationdate'] + 10 hours"))); ?> access until: <?php echo $datee; ?> however rather use clean approach , things seperately (plus: got no idea format registrationdate shortcode is. unix timestamp or string formatted date/time?)
<?php // let's assume minute $registrationdate php date aka unix timestamp // if it's not, you'll have first run through strtotime again, i.e.: // $registrationdate = strtotime(do_shortcode("[mm_member_data name='registrationdate']")); $registrationdate = do_shortcode("[mm_member_data name='registrationdate']"); $datee = date("f j, y g:i a", $registrationdate + 36000); ?> access until: <?php echo $datee; ?>
Comments
Post a Comment