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.

API notification for bulk upload users

Home Forums Community Forum API notification for bulk upload users

This topic contains 4 replies, has 2 voices. Last updated by  Kevin Murphy 3 years, 4 months ago.

Topic Author Topic
Posted: Wednesday Aug 14th, 2013 at 1:21 pm #55785

We have a bunch of old users from previous software, and have looked at the documentation for uploading:

http://www.s2member.com/kb/how-to-migrate-to-s2member-pro-from-other-software/
http://www.s2member.com/kb/importing-updating-users/

However, I can’t find anything on the API notifications — we have an API notification set up for adding users to a CRM for new registrations (plugin also works with default WordPress account creation, via new user or admin).

How would we integrate this with the bulk upload? Would the API notifications work in the same way? Would we need to queue the users via our script?

List Of Topic Replies

Viewing 4 replies - 1 through 4 (of 4 total)
Author Replies
Author Replies
Posted: Wednesday Aug 14th, 2013 at 1:47 pm #55786

Also, as a side note, wouldn’t it be wise to have a header row for the CSV upload? Then you could simply include the fields you want and they’d be automatically synced.

Posted: Thursday Aug 15th, 2013 at 11:11 pm #55974
Bruce
Username: Bruce
Staff Member

How would we integrate this with the bulk upload? Would the API notifications work in the same way? Would we need to queue the users via our script?

No, s2Member’s User Import does imports silently, and will not send any emails, add Users to any lists, or perform any API Notifications. This import routine remains silent in every possible way on purpose, so as not to introduce any actions that might be tied to Hooks/Plugins for WordPress. API Notifications are tied to Hooks/Plugins, so they are not processed.

If you wanted to stop this from happening temporarily, you could alter this file to prevent the silencing from happening, but I would suggest against it if you’re running any other plugins that could be hooking into the Add New User / Edit User processes. You might turn off these plugins if you absolutely need to do this:

/s2member-pro/includes/classes/imports-in.inc.php

You’d be looking for lines with portions that look like this:

remove_all_actions("profile_update") . remove_all_actions ("user_register");
remove_all_actions("added_existing_user") . remove_all_actions ("add_user_to_blog");
That’s about as far as we can go with custom code. If you need further assistance, we recommend http://jobs.wordpress.net, or another freelance web site where WordPress® experts are offering their expertise through a bid on your project.
Posted: Thursday Aug 15th, 2013 at 11:14 pm #55975
Bruce
Username: Bruce
Staff Member

Also, as a side note, wouldn’t it be wise to have a header row for the CSV upload? Then you could simply include the fields you want and they’d be automatically synced.

The new version of s2Member do support rows for your fields, but you need to have them set up in s2Member already. This is detailed here:

http://www.s2member.com/kb/importing-updating-users/#custom-registration-profile-fields

The easiest way to get these Custom Registration/Profile Fields set up right is to first export a CSV file from your current installation of s2Member, and use that as a basis for your Import.

Posted: Friday Aug 16th, 2013 at 11:03 am #56033

Good to know Bruce, we’ll consider our options and use the above as a last resort. The CSV upload isn’t so much the problem, if we were to enable the hooks we’d still have to loop through each user individually and add via the CRM api — so there may be an easier way to achieve this. Will have a think.

Thanks!

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