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.

Custom Import Issue

Home Forums Community Forum Custom Import Issue

This topic contains 9 replies, has 3 voices. Last updated by  Cristián Lávaque 3 years, 7 months ago.

Topic Author Topic
Posted: Tuesday May 28th, 2013 at 11:11 pm #50782

I’m trying to convert an existing DAP membership system to S2 for my client. They already have a separate table in the database that has a registration and an expiration date tied to their WP_user table. Is there a way to run a db query to update the expiration date for these users without having to export using S2 and then manually try to merge two different files?

List Of Topic Replies

Viewing 9 replies - 1 through 9 (of 9 total)
Author Replies
Author Replies
Posted: Wednesday May 29th, 2013 at 8:52 am #50829
Bruce
Username: Bruce
Staff Member

Thank you for your inquiry.

I’m trying to convert an existing DAP membership system to S2 for my client. They already have a separate table in the database that has a registration and an expiration date tied to their WP_user table. Is there a way to run a db query to update the expiration date for these users without having to export using S2 and then manually try to merge two different files?

You can do that like this:

<?php
update_user_option ($user_id, 's2member_auto_eot_time', $eot);
Posted: Wednesday May 29th, 2013 at 9:42 am #50833

Hi Bruce,

Can you give me a little more detail?

Posted: Thursday May 30th, 2013 at 12:48 am #50894

This is the documentation for the function Bruce used in his example: http://codex.wordpress.org/Function_Reference/update_user_option

Also, did you see this article? Knowledge Base » How to Migrate to s2Member Pro from Other Software

Posted: Thursday May 30th, 2013 at 10:46 am #50951

Thanks Christian,

For some reason I had trouble with the function but was able to create my own function to do the massive update. My only problem now is that it doesn’t appear that even with an EOT, that the cron job is changing the status from Level 1 to Level 0 for expired users.

Posted: Friday May 31st, 2013 at 5:57 am #51004

So the users have an s2Member Level 1 (s2member_level1) role and an EOT time in the past, but the EOT behavior is not happening?

Could you verify in the user’s profile what role he has and if the EOT time looks okay?

If that doesn’t help, could you submit your site’s info so I take a look? Please leave a reply here after you send it. Thanks! s2Member® » Private Contact Form

Posted: Friday May 31st, 2013 at 1:36 pm #51065

Hi Cristian,
Yes, the EOT looks fine and was even updated to proper formatting after the import. For a given member they show s2member_level1 and an EOT in the past. If the user logs in, they have access to restricted content. I’ll create an admin access for you and send the information in the private forum.

Posted: Friday May 31st, 2013 at 10:39 pm #51103

Thanks, I looked at the user and even made the EOT time into 2010-01-01 and so far he hasn’t been demoted. Let’s give it a bit more time (sometimes wp-cron doesn’t happen immediately).

But I’m suspecting that maybe something in your installation is affecting the way wp-cron works. I’d try these: Knowledge Base » Common Troubleshooting Tips

You can also try your own cron job. [hilite path]Dashboard -› s2Member® -› PayPal® Options -› Automatic EOT Behavior -> Enable[/hilite]

Posted: Saturday Jun 1st, 2013 at 2:46 pm #51144

Perhaps the cron job is taking a long time to complete? Does it only do a few records at a time?

Posted: Sunday Jun 2nd, 2013 at 3:02 am #51163

Did you import a lot of members with EOT times already expired? If so, it may be that they are being demoted little by little to avoid timeouts. But if you already needs a demotion, I’d simply import him at Level 0 instead of an expired Level 1.

Viewing 9 replies - 1 through 9 (of 9 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.