• Resolved digihouse

    (@digihouse)


    Hi,

    we created a function to add a new field:

    function custom_user_merge_tags($merge_vars, $user) {
       
    	// Get the WP_User ID
        $user_id = $user->ID;
    	// Get the WP_User roles and capabilities
        $user_roles = $user->roles;
    	// Letzte User Rolle im Array ist die Händlergruppe
    	$client_user_role = end($user_roles);
    	/// add whatever you want to the merge tags
        $merge_vars['USERROLLE'] = $client_user_role;
       
        return $merge_vars;
    }
    
    add_filter('mailchimp_sync_user_mergetags', 'custom_user_merge_tags', 100, 2);
    

    As soon as a new user registers it works fine. But i can’t update existing users.
    If i click resync nothing happens. Users are not updated.

    Any ideas?

    thx
    Chris

Viewing 1 replies (of 1 total)
  • Plugin Author ryanhungate

    (@ryanhungate)

    @digihouse the people that would be synced are the ones that have placed orders. This doesn’t just take the wordpress userbase, it works off of order history and new users moving forward.

    Right now the only way to do this would be to execute an update on the users and then you should see that happen as expected.

    Thanks for the feedback!

Viewing 1 replies (of 1 total)

The topic ‘Update Users with additional Field’ is closed to new replies.