strangerstudios / pmpro-mailchimp

WordPress plugin for MailChimp integration.
https://www.paidmembershipspro.com/add-ons/pmpro-mailchimp-integration/
GNU General Public License v3.0
25 stars 23 forks source link

Enhancement: Additional hooks/filters around lists being populated #104

Closed JarrydLong closed 3 years ago

JarrydLong commented 4 years ago

Opening for this topic: https://www.paidmembershipspro.com/forums/topic/changing-mailchimp-opt-in-settings-for-pmpro-mailchimp-add-on/

It would be nice to be able to change the "Join our mailing list" to something of your preference, as well as be able to automatically enable/check the checkboxes with a hook.

dparker1005 commented 3 years ago

It would be nice to be able to change the "Join our mailing list" to something of your preference

This can be done using a gettext filter. Example code: https://gist.github.com/strangerstudios/0ea172d918173e8376b7 Please note that the above code translates for the text domain pmpro, though we have switched the PMPro Mailchimp Integration Add On code to instead use the text domain pmpro_mailchimp.

as well as be able to automatically enable/check the checkboxes with a hook

This is typically not recommended as it is best practice to ensure that the user purposefully opts into a mailing list before adding them. The act of a user ignoring a checkbox does not explicitly show their consent to joining a mailing list. With that being said, we do have a code recipe here that can be used to default those checkboxes to being checked: https://gist.github.com/andrewlimaza/1e3344ab73458c40b812262198599f61