• Resolved matthiasreiter

    (@matthiasreiter)


    Hello,
    I set up different user roles in WP (Role1 and Role2). I also set up the webhook which works (I tested it with other fields like name etc.) to sync changes made in MC to WP.

    Now I created a MC campaign that, after sending, sets the user role field from Role1 to Role2. This also works.

    What is not working is the sync back to wordpress where the user is still assigned Role1 instead of Role2.

    In Mailchimp I set the field under “List fields and *|MERGE|* tags” as a text field up.

    How can I sync user role changes in Mailchimp back to wordpress?

    With kind regards
    Matthias

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Lap

    (@lapzor)

    Hi,

    The 2 way hook is meant to sync back field values, not the user Role.

    I think you would need to write your own custom code to do this, hooking into

    add_filter( ‘mailchimp_sync_webhook_user’, function( $user, $data ) {
    //check the $data for new role and set $user to that role.
    }

    Writing this code would be out of scope for our support.

    Hope that helps. If you have any questions, please let us know!

    Thread Starter matthiasreiter

    (@matthiasreiter)

    Thanks for your reply. Im not able to write this code, so I will try to finde a workaround or have to hire someone.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change WP User role via Mailchimp Webhook not working’ is closed to new replies.