Last active
August 31, 2020 14:40
-
-
Save max-kk/d476f86aa2ac1bdddc538ff3fa01277a to your computer and use it in GitHub Desktop.
LMR :: Mailchimp for WordPress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Use this code to send proper First & Last name to the Mailchimp | |
| // COPY AFTER | |
| add_filter( 'mc4wp_integration_data', function( $data ) { | |
| if( ! empty( $_POST[ 'first-name' ] ) ) { | |
| $data[ 'FNAME' ] = sanitize_text_field( $_POST[ 'first_name-6133' ] ); | |
| } | |
| if( ! empty( $_POST[ 'last-name' ] ) ) { | |
| $data[ 'LNAME' ] = sanitize_text_field( $_POST[ 'last_name-6133' ] ); | |
| } | |
| return $data; | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Mailchimp for WordPress - https://www.mc4wp.com/ --> | |
| <input type="hidden" name="_mc4wp_subscribe_wp-registration-form" value="0"> | |
| <p class=" mc4wp-checkbox mc4wp-checkbox-wp-registration-form"> | |
| <label> | |
| <input type="checkbox" name="_mc4wp_subscribe_wp-registration-form" value="1"> | |
| <span>Yes, add me to your mailing list</span> | |
| </label> | |
| </p> | |
| <!-- / Mailchimp for WordPress --> | |
| <style> | |
| .lrm-integrations.lrm-integrations--register:not(.lrm-info--register) { display:none; } | |
| </style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment