Title: mtlsam's Replies | WordPress.org

---

# mtlsam

  [  ](https://wordpress.org/support/users/mtlsam/)

 *   [Profile](https://wordpress.org/support/users/mtlsam/)
 *   [Topics Started](https://wordpress.org/support/users/mtlsam/topics/)
 *   [Replies Created](https://wordpress.org/support/users/mtlsam/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/mtlsam/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/mtlsam/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/mtlsam/engagements/)
 *   [Favorites](https://wordpress.org/support/users/mtlsam/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 47 total)

1 [2](https://wordpress.org/support/users/mtlsam/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/mtlsam/replies/page/3/?output_format=md)
[4](https://wordpress.org/support/users/mtlsam/replies/page/4/?output_format=md)
[→](https://wordpress.org/support/users/mtlsam/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[MC4WP: Mailchimp for WordPress] String translation doesn’t take effect for [mc4wp_integrations][contact-form-7]](https://wordpress.org/support/topic/string-translation-doesnt-take-effect-for-mc4wp_integrationscontact-form-7/)
 *  Thread Starter [mtlsam](https://wordpress.org/support/users/mtlsam/)
 * (@mtlsam)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/string-translation-doesnt-take-effect-for-mc4wp_integrationscontact-form-7/#post-18272709)
 * When using that exact text, it shows to the default translation you have for 
   that text, but I’m not seeing how to replace this text with my own sentence for
   both languages. Where would I do that, that doesn’t result in the initial problem?
   Thanks.
 * For example, even if I apply a string translation in WPML to the default “Sign
   me up for the newsletter!”, it doesn’t apply. It only applies the default translation
   that comes with the plugin (I suppose).
 * So custom english text with the string translated results in the custom english
   text being show for all languages, and default english text with string translated
   results in default text showing everywhere, translated but not what I wrote.
 * If the site used what I put as my label in my button, I could just handle translation
   that way, but “subscribe” doesn’t get used, it only uses what’s in the CF7 integration
   settings field. I have to put a text label here or else the button will show 
   my list ID as the label.
 * [mc4wp_checkbox “Subscribe” value=”123abc”]
    -  This reply was modified 1 year, 5 months ago by [mtlsam](https://wordpress.org/support/users/mtlsam/).
    -  This reply was modified 1 year, 5 months ago by [mtlsam](https://wordpress.org/support/users/mtlsam/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[MC4WP: Mailchimp for WordPress] String translation doesn’t take effect for [mc4wp_integrations][contact-form-7]](https://wordpress.org/support/topic/string-translation-doesnt-take-effect-for-mc4wp_integrationscontact-form-7/)
 *  Thread Starter [mtlsam](https://wordpress.org/support/users/mtlsam/)
 * (@mtlsam)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/string-translation-doesnt-take-effect-for-mc4wp_integrationscontact-form-7/#post-18268059)
 * Unfortunately no, I was already on 4.10.0 and 1.0.3 for the MC4WP: WPML compatibility
   plugin.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[MC4WP: Mailchimp for WordPress] Multiple checkboxes as their own merge tags?](https://wordpress.org/support/topic/multiple-checkboxes-as-their-own-merge-tags/)
 *  Thread Starter [mtlsam](https://wordpress.org/support/users/mtlsam/)
 * (@mtlsam)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/multiple-checkboxes-as-their-own-merge-tags/#post-18264290)
 * No problem! Anyone using this should use the following code and not the code 
   in my other reply, as it wasn’t PHP 8 friendly.
 *     ```wp-block-code
       class WPCF7_SelectedCitiesHandler {    public function __construct() {        // Hook into Contact Form 7 mail sent action        add_action('wpcf7_mail_sent', [$this, 'handle_mail_sent']);        // Hook into MailChimp filter        add_filter('mc4wp_subscriber_data', [$this, 'filter_subscriber_data'], 10, 1);    }    public function handle_mail_sent($contact_form) {        // Add your handling logic here if needed, or leave it empty for now        error_log('Mail sent action triggered. Form ID: ' . $contact_form->id());    }    public function filter_subscriber_data(MC4WP_MailChimp_Subscriber $subscriber) {        // Add website subscriber tag        $subscriber->tags[] = 'Website Newsletter Subscriber';        // Retrieve the selected cities from the form submission directly        $submission = WPCF7_Submission::get_instance();        $posted_data = $submission->get_posted_data();        $selected_cities = !empty($posted_data['cities']) ? $posted_data['cities'] : [];        // Log the selected cities to ensure they are available        error_log("Selected Cities in filter_subscriber_data (From Form Submission): " . print_r($selected_cities, true));        // Check if selected cities exist and add them as tags dynamically        if (!empty($selected_cities)) {            foreach ($selected_cities as $city) {                // Add city name as a tag                $subscriber->tags[] = $city;            }        }        // Log the updated tags to confirm        error_log("Updated Tags: " . implode(", ", $subscriber->tags));        return $subscriber;    }}// Instantiate the handlernew WPCF7_SelectedCitiesHandler();
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[MC4WP: Mailchimp for WordPress] Multiple checkboxes as their own merge tags?](https://wordpress.org/support/topic/multiple-checkboxes-as-their-own-merge-tags/)
 *  Thread Starter [mtlsam](https://wordpress.org/support/users/mtlsam/)
 * (@mtlsam)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/multiple-checkboxes-as-their-own-merge-tags/#post-18246058)
 * This function I’ve produced appears to work for this purpose, it’s adding each
   of my selected array values in my cities checkbox as their own mailchimp tags!
 *     ```wp-block-code
       class WPCF7_SelectedCitiesHandler {    public function __construct() {        // Hook into Contact Form 7 mail sent action        add_action('wpcf7_mail_sent', [$this, 'handle_mail_sent']);        // Hook into MailChimp filter        add_filter('mc4wp_subscriber_data', [$this, 'filter_subscriber_data'], 10, 1);    }    public function filter_subscriber_data(MC4WP_MailChimp_Subscriber $subscriber) {        // Retrieve the selected cities from the form submission directly        $submission = WPCF7_Submission::get_instance();        $posted_data = $submission->get_posted_data();        $selected_cities = !empty($posted_data['cities']) ? $posted_data['cities'] : [];        // Check if selected cities exist and add them as tags dynamically        if (!empty($selected_cities)) {            foreach ($selected_cities as $city) {                // Add city name as a tag                $subscriber->tags[] = $city;            }        }        return $subscriber;    }}// Instantiate the handlernew WPCF7_SelectedCitiesHandler();
       ```
   
    -  This reply was modified 1 year, 6 months ago by [mtlsam](https://wordpress.org/support/users/mtlsam/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[MC4WP: Mailchimp for WordPress] Multiple checkboxes as their own merge tags?](https://wordpress.org/support/topic/multiple-checkboxes-as-their-own-merge-tags/)
 *  Thread Starter [mtlsam](https://wordpress.org/support/users/mtlsam/)
 * (@mtlsam)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/multiple-checkboxes-as-their-own-merge-tags/#post-18232621)
 * Thanks for your reply, I think there was a pasting issue with your example code
   that you wanted to share with me, it’s just a link to this post haha.
 * Could you reshare the code you intended? Much appreciated!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WPS Hide Login] Request: Remove persistent notice](https://wordpress.org/support/topic/request-remove-persistent-notice/)
 *  Thread Starter [mtlsam](https://wordpress.org/support/users/mtlsam/)
 * (@mtlsam)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/request-remove-persistent-notice/#post-17366276)
 * Appreciate it thanks
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WPGSI: Spreadsheet Integration] Freemius SDK <= 2.5.9 – Reflected Cross-Site Scripting via fs_request_get](https://wordpress.org/support/topic/freemius-sdk-2-5-9-reflected-cross-site-scripting-via-fs_request_get-3/)
 *  Thread Starter [mtlsam](https://wordpress.org/support/users/mtlsam/)
 * (@mtlsam)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/freemius-sdk-2-5-9-reflected-cross-site-scripting-via-fs_request_get-3/#post-17024526)
 * Thanks!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form 7] Mail 2 message body doesn’t apply inline CSS](https://wordpress.org/support/topic/mail-2-message-body-doesnt-apply-inline-css/)
 *  Thread Starter [mtlsam](https://wordpress.org/support/users/mtlsam/)
 * (@mtlsam)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/mail-2-message-body-doesnt-apply-inline-css/#post-16989444)
 * Actually the problem is my lack of familiarity with html/css limitations within
   email apps like outlook, I don’t think this has anything to do with CF7 or WP
   at this point.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Lightbox with PhotoSwipe] Can’t get this to work at all anymore](https://wordpress.org/support/topic/cant-get-this-to-work-at-all-anymore/)
 *  Thread Starter [mtlsam](https://wordpress.org/support/users/mtlsam/)
 * (@mtlsam)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/cant-get-this-to-work-at-all-anymore/#post-15951005)
 * Turns out it was actually a conflict with Yoast, specifically the “force rewrite
   titles” option when it’s enabled.
 * My theme was lacking a hook for Yoast, this force rewrite feature only appears
   in the settings if you’re missing that hook.
 * I added the Yoast hook which allowed me to disable that setting, allowing your
   plugin to work.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[iQ Block Country] DBVERSION Undefined in Version 1.2.15](https://wordpress.org/support/topic/dbversion-undefined-in-version-1-2-15/)
 *  [mtlsam](https://wordpress.org/support/users/mtlsam/)
 * (@mtlsam)
 * [4 years ago](https://wordpress.org/support/topic/dbversion-undefined-in-version-1-2-15/#post-15807101)
 * Thanks for getting the plugin back online!
 * I get this too, on a site I just launched today on a fresh Siteground install,
   PHP 7.4.30.
 * It doesn’t break my site but I see this error at the top of the page in the back
   end.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ajax Load More – Infinite Scroll, Load More, & Lazy Load] Loads wrong language.. sometimes?](https://wordpress.org/support/topic/loads-wrong-language-sometimes/)
 *  Thread Starter [mtlsam](https://wordpress.org/support/users/mtlsam/)
 * (@mtlsam)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/loads-wrong-language-sometimes/#post-15237041)
 * Thanks! I’ll await your investigation.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ajax Load More – Infinite Scroll, Load More, & Lazy Load] Loads wrong language.. sometimes?](https://wordpress.org/support/topic/loads-wrong-language-sometimes/)
 *  Thread Starter [mtlsam](https://wordpress.org/support/users/mtlsam/)
 * (@mtlsam)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/loads-wrong-language-sometimes/#post-15214967)
 * Following up on this for support please. I’m not sure why the code pasted in 
   an ugly manner the first time, so here is a second attempt, it’s the exact same
   code.
 *     ```
       <?php if ( ICL_LANGUAGE_CODE==’en’ ) : ?>
       <?php echo do_shortcode(‘[ajax_load_more container_type=”ul” post_type=”post” custom_args=”lang:en” category=”teen-health” posts_per_page=”4″ repeater=”template_1″ scroll=”true” scroll_distance=”160″ transition=”fade” orderby=”date” order=”DSC”]’); ?>
       <?php elseif ( ICL_LANGUAGE_CODE==’fr’ ) : ?>
       <?php echo do_shortcode(‘[ajax_load_more container_type=”ul” post_type=”post” custom_args=”lang:fr” category=”sante-des-ados” posts_per_page=”4″ repeater=”template_1″ scroll=”true” scroll_distance=”160″ transition=”fade” orderby=”date” order=”DSC”]’); ?>
       <?php endif; ?>
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[MC4WP: Mailchimp for WordPress] CF7 method, only some fields populate in MC](https://wordpress.org/support/topic/cf7-method-only-some-fields-populate-in-mc/)
 *  Thread Starter [mtlsam](https://wordpress.org/support/users/mtlsam/)
 * (@mtlsam)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/cf7-method-only-some-fields-populate-in-mc/#post-14958506)
 * It is 100% the same code, I have double checked that I am not loading the wrong
   form onto this page.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[MC4WP: Mailchimp for WordPress] CF7 method, only some fields populate in MC](https://wordpress.org/support/topic/cf7-method-only-some-fields-populate-in-mc/)
 *  Thread Starter [mtlsam](https://wordpress.org/support/users/mtlsam/)
 * (@mtlsam)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/cf7-method-only-some-fields-populate-in-mc/#post-14951751)
 * Well in CF7, this is my form, you can see the MC4WP- in each field.
 * Should this be displaying in the DOM? I have another project using this same 
   setup and it does not have any issues, on that project I also do not see any 
   mention of MC4WP in the input fields in the DOM.
 *     ```
       <figure class="wpcf7_field_first_name">
         [text* first-name MC4WP-FNAME placeholder "First Name *"]
       </figure>
   
       <figure class="wpcf7_field_last_name">
         [text* last-name MC4WP-LNAME placeholder "Last Name *"]
       </figure>
   
       <figure class="wpcf7_field_email">
         [email* email MC4WP-EMAIL placeholder "Email *"]
       </figure>
   
       <figure class="wpcf7_field_phone">
         [tel phone MC4WP-TEL placeholder "Phone Number"]
       </figure>
   
       <figure class="wpcf7_field_company">
         [text* company MC4WP-COMP placeholder "Organization *"]
       </figure>
   
       <figure class="text-color-white">
         [mc4wp_checkbox]
       </figure>
   
       [cf7sr-simple-recaptcha]
   
       [submit "Get Access"]
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[MC4WP: Mailchimp for WordPress] CF7 method, only some fields populate in MC](https://wordpress.org/support/topic/cf7-method-only-some-fields-populate-in-mc/)
 *  Thread Starter [mtlsam](https://wordpress.org/support/users/mtlsam/)
 * (@mtlsam)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/cf7-method-only-some-fields-populate-in-mc/#post-14947929)
 * Is there any way I can see the info being passed to Mailchimp via the browser
   developer tools? I really need to get this solved in order to launch a marketing
   campaign.

Viewing 15 replies - 1 through 15 (of 47 total)

1 [2](https://wordpress.org/support/users/mtlsam/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/mtlsam/replies/page/3/?output_format=md)
[4](https://wordpress.org/support/users/mtlsam/replies/page/4/?output_format=md)
[→](https://wordpress.org/support/users/mtlsam/replies/page/2/?output_format=md)