latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Reset first payment date

Home Forums Community Forum Reset first payment date

Tagged: 

This topic contains 5 replies, has 4 voices. Last updated by  Jason (Lead Developer) 4 years, 9 months ago.

Topic Author Topic
Posted: Thursday Mar 15th, 2012 at 8:59 am #8226

Hello,

I’m going to start content dripping on my existing installation using


<?php if(s2member_paid_registration_time() >= strtotime("-30 days")){ ?>
       Drip content to Members that started paying you at any Level, at least 30 days ago.
<?php } ?>

My question is if there is an easy way to reset the first payment date to say today for all members without affecting any other value?

Thank you

List Of Topic Replies

Viewing 5 replies - 1 through 5 (of 5 total)
Author Replies
Author Replies
Posted: Thursday Mar 15th, 2012 at 11:23 am #8254
Raam Dev
Username: Raam
Staff Member

Hi Philly,

There is no easy way to do that. You’d need to manually modify the database values, which are stored in wp_usermeta under the meta_key wp_s2member_paid_registration_times. The values are stored as a Unix Timestamp.

Posted: Thursday Mar 15th, 2012 at 1:20 pm #8270

Thanks Raam,

Do you know the order of the values some are

a:2:{s:5:"level";s:10:"1325583608";s:6:"level1";s:10:"1325583608";}

and

a:4:{s:5:"level";s:10:"1325623762";s:6:"level1";s:10:"1325623762";s:6:"level3";s:10:"1329175184";s:6:"level4";s:10:"1329678808";}

I’ve tried searching but no results.

Thank you

Posted: Friday Mar 16th, 2012 at 2:12 pm #8383
Raam Dev
Username: Raam
Staff Member

Hi Philly,

I need to consult with the lead developer (Jason). I will get back to you when I have more information.

Thank you for your patience!

Posted: Friday Mar 16th, 2012 at 5:54 pm #8427

Maybe this does what you need?

[hilite pre_code]

Drip content to Members that started paying you at any Level before March 16 2012 or more than 30 days ago.

[/hilite]

After a month you can remove the part with the date and just leave the 30 days.

Posted: Saturday Mar 17th, 2012 at 2:31 am #8445
Staff Member
The documentation on this API function is available here.
a:4:{s:5:"level";s:10:"1325623762";s:6:"level1";s:10:"1325623762";s:6:"level3";s:10:"1329175184";s:6:"level4";s:10:"1329678808";}

There’s no specific order. This is stored in the DB as a serialized associative array. Each *paying* customer will have the "level" array element, indicating the first paid registration time, at whatever Membership Level they paid for initially. When you call s2member_paid_registration_time(), that’s what you get; the value of the "level" array element. If you call s2member_paid_registration_time("level1"), you’re pulling the array element for "level1", indicating the paid registration time specifically at Membership Level #1.

The documentation on this API Function should help to clarify this.
All timestamps returned by this API Function are in GMT (Universal Time).

If you call s2member_paid_registration_time("level4"), and the current User has never paid you for Level #4 access (ever), the function will return 0.

Viewing 5 replies - 1 through 5 (of 5 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.