Can I extract IP address and / or location of members from S2MemberPro?

So can I extract IP address and / or location (country primarily but if more information like state or postcode is available) of members from S2MemberPro?

And is it only for existing members or could historical / past members info be extracted too?

I use PayPal and ProForms to process the payments. I’m struggling to find much in Paypal other than customer name, email and occasionally IP address through any of their reporting or customer extraction options.

I need to find the information for tax purposes to prove where customers are based.

If it can be extracted from S2MemberPro, then how would I go about that?

Alternatively if you know a way to extract this from Paypal I’d love to hear that too?

Thanks in advance.

You can create custom profile fields to ask for more data from the user on signup. WP Admin > s2Member > General Options > Registration/Profile Fields & Options

For the user’s IP on registration, you’ll find it in the user’s profile, under the s2Member section. To get it via PHP you could try:

get_user_option('s2member_registration_ip', $user_id);

To get the user’s IP when he pays, you could set up a payment notification here: WP Admin > s2Member > API / Notifications > Payment

Does that help? :slight_smile:

Also you can export all the member’s info (look at this manual) and to delete the extra.

Thanks for your reply guys. It may be useful going forward though I was hoping to get this data historically from previous sales / customers.

So I guess that won’t be an option?

And as I haven’t actively been collecting address and location on my sign up forms then the information I’m looking for won’t be there.

Gotcha.

If you happened to have s2Member’s logging enabled (which isn’t on by default, but maybe you left it running), you’d find quite a bit of data from past transactions. WP Admin > s2Member > Log Files

Log files are the right place, but overloaded with extra information. There exists a log plugin, that saves the “referring URL”, can be extended to save the IP too. But will not works for “past sales”, only “after installation” ones… Well, similarly to the log files, as they are not enabled by default.

Unfortunately I don’t have logs turned on. Thanks for the suggestion.

What I do have is weekly backups of my site from my hosting company, would the information be contained within there anywhere?

I looked through the downloaded files and many I couldn’t open due to the file type or had no idea what they were so was hard to determine if the info might be lurking in there somewhere.

Would you have any insights into that?

Thanks again

Actually, sounds like you need the “subscription IP” and the “subscription date” of all the members, right?

Yes, that would be a good start. Is it available?

Yes, in the database. For the existing members only, deleted ones are missing. There is several ways:

  • SQL script: one row code, to search directly in DB, you get “ID”, “join date” and “subscription IP” for each user. More sophisticated SQL code will give you the username and names of the user too. I would use this method, faster for me.

  • Export all the member’s info (with the manual I show already): gives you a CSV file, but needs some “massage”…

  • PHP code: Should be a PHP script, maybe best will be to create an usual [shortcode] in some WP page, to show all the info. Christian already show you some piece of it:
    get_user_option(‘s2member_registration_ip’, $user_id);
    Also this shows you the “joining time”:
    get_user_option(‘user_registered’, $user_id);
    I will add one more row, this gives you an array with the times of purchasing (note that these are “Unix time stamps”):
    get_user_option(‘s2member_paid_registration_times’, $user_id);
    Sure, must build a loop of all the members to get the info for everyone.

  • Manually as admin, at “Users” page you will see the “joining date”, and in user’s profile you will get the IP.

Sorry to dig up an old thread but some clarification on something…

I just remembered that every time a user signs up to my membership site in S2MemberPro I get an email to my inbox titled “New User Registration” and inside it is the members username, email, IP address etc.

Is this email notification being sent from S2MemberPro?

And if so is there a way to access / store / download all notifications it’s sent in the past?

I have all the emails saved in a sub-folder of my inbox but there’s 1000’s of transactions which makes it difficult to work with and extract.

Apologies if this is covering the same ground as previously it’s just I hadn’t noticed I had these emails before and thought if there’s an email there may be a record of it stores somewhere inside Wordpress / S2Member Pro that could be accessed.

Thanks again

There’s the s2Member Pro exporter, which you can use to get all your users in a CSV file and view it in a spreadsheet application. https://s2member.com/kb-article/advanced-importexport-tools/

I hope that helps. :slight_smile:

But that only contains active members doesn’t it?

I’m looking to extract data from historic members / notifications.

The notifications are not stored anywhere.

By historic members, you mean those that stopped paying and got demoted to level 0? Yes, those would be included. If you mean members that were deleted, then no.

The most comprehensive export I have found is All Export Pro. It is a “pay for” plug-in but the quality is high and you only pay once (lifetime support).

I have used it to extract proprietary S2Member user fields as part of my user table dump for clients.

http://www.wpallimport.com/order-now/wp-all-export/

NOTE: This is not an affiliate link and I am not affiliated with the company. So…just a suggestion…do your own due-diligence and Caveat Emptor :slight_smile: