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.

Multiple Opt Ins

Home Forums Community Forum Multiple Opt Ins

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

Topic Author Topic
Posted: Wednesday Feb 27th, 2013 at 2:12 pm #43342
Daniel Maskell
Username: EBUK

I am aware of the mailchimp hack which silently adds the user to a list.
Have tested it, but sure its useful.

I want to add the user to two lists.

1 Members Promo
2 Members Info

They have to be opted in to

2 Members Info ( using silent hack)

but can choose to opt in to

1 Members Promo

Ideally they choose to opt in at registration.

Any Ideas?

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Friday Mar 1st, 2013 at 8:24 am #43462

Hi Daniel.

Could you post here the code for the hack you’re using?

If I’m not mistaken, in that same hack you could check whether the user opted in or not and change the lists he’d be added to based on it. If you print_r the vars you get with the hook, you should find the ones you need to use.

Posted: Friday Mar 1st, 2013 at 9:26 am #43475
Daniel Maskell
Username: EBUK

Hi

Im using the hack below in

/wp-content/s2-hacks.php

<?php
add_filter("ws_plugin__s2member_mailchimp_double_optin", "__return_false");
?>

Do I need to modify this and pass it variable?
If so, can you please describe, newb here.

Thanks

Posted: Saturday Mar 2nd, 2013 at 8:35 am #43595

Ah, no, that’s not the one I had in mind.

Anyway, you can do something like this:

[hilite pre_code]
add_filter('ws_plugin__s2member_before_process_list_servers', 'mailchimp_custom_lists');

function mailchimp_custom_lists($vars) {
print_r($vars); // See what vars you have available to edit.
}
[/hilite]

Take a look at this file, too, so you see where the hook is and what you can do: s2member\includes\classes\list-servers.inc.php.

For example: [hilite mono]$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $level . "_mailchimp_list_ids"][/hilite], [hilite mono]$opt_in[/hilite], [hilite mono]$double_opt_in[/hilite].

I hope that helps.

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