Title: Mailchimp Error
Last modified: October 9, 2019

---

# Mailchimp Error

 *  Resolved [sodeypunk](https://wordpress.org/support/users/sodeypunk/)
 * (@sodeypunk)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/mailchimp-error-4/)
 * Hi, im receiving the following error when using the mailchimp block. I noticed
   that the site is trying to post using first-name and last-name while the mailchimp
   fields are FNAME and LNAME. Would that be the issue? Error below:
 * 400: The resource submitted could not be validated. For field-specific details,
   see the ‘errors’ array.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fmailchimp-error-4%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Contributor [motopress](https://wordpress.org/support/users/motopress/)
 * (@motopress)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/mailchimp-error-4/#post-12015872)
 * Hi, we followed the link and subscribed to your news via the Getwid block and
   did not get any error. Could you give us step-by-step instructions on how to 
   recreate the issue?
 *  Thread Starter [sodeypunk](https://wordpress.org/support/users/sodeypunk/)
 * (@sodeypunk)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/mailchimp-error-4/#post-12022427)
 * Thanks for following up. I fixed the issue myself by making some code changes
   in the plugin. Specifcally, i had to change the first_name and last_name to first-
   name and last-name in the mailchimp block because you guys are passing back first-
   name and last-name as the field names back to the class. specifcally the code
   below had to be changed.
 * this is what your call looked like
 * `first-name=test&last-name=test&email=test%40gmail.com&list_ids=11111111111`
 * Changed code:
 *     ```
        if ( isset( $data[ 'first-name' ] ) ) {
                   $merge_vars[ 'merge_fields' ][ 'FNAME' ] = $data[ 'first-name' ];
               }
   
               if ( isset( $data[ 'last-name' ] ) ) {
                   $merge_vars[ 'merge_fields' ][ 'LNAME' ] = $data[ 'last-name' ];
               }
       ```
   
 * i also had to unset the interests field because mailchimp does not take any blank
   fields that are not listed as fields on the mailchimp side and since there are
   no “interest” fields to populate in the getwid block, it had to be unset
 *     ```
       if ( empty( $merge_vars[ 'interests' ] ) ) {
                   unset( $merge_vars[ 'interests' ] );
               }
       ```
   
 * It would be awesome to have these changes in your next update
    -  This reply was modified 6 years, 8 months ago by [sodeypunk](https://wordpress.org/support/users/sodeypunk/).
    -  This reply was modified 6 years, 8 months ago by [sodeypunk](https://wordpress.org/support/users/sodeypunk/).
 *  Plugin Contributor [motopress](https://wordpress.org/support/users/motopress/)
 * (@motopress)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/mailchimp-error-4/#post-12027642)
 * Thanks for your reply. We have replicated the issue on our side and we’ll fix
   it in the next update. Thanks and accept apologies for inconveniences.
 *  Plugin Contributor [motopress](https://wordpress.org/support/users/motopress/)
 * (@motopress)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/mailchimp-error-4/#post-12031634)
 * Hi [@sodeypunk](https://wordpress.org/support/users/sodeypunk/),
    We have just
   released new version of plugin where this issue has been fixed. Also we added
   option to change position of currency. thank you for collaboration
 * We’d appreciate if you review Getwid plugin here [https://wordpress.org/support/plugin/getwid/reviews/#new-post](https://wordpress.org/support/plugin/getwid/reviews/#new-post)

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Mailchimp Error’ is closed to new replies.

 * ![](https://ps.w.org/getwid/assets/icon.svg?rev=2238400)
 * [Getwid - Gutenberg Blocks](https://wordpress.org/plugins/getwid/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/getwid/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/getwid/)
 * [Active Topics](https://wordpress.org/support/plugin/getwid/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/getwid/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/getwid/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [motopress](https://wordpress.org/support/users/motopress/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/mailchimp-error-4/#post-12031634)
 * Status: resolved