• Suppose I added a custom user field to the user profile to collect the WordPress user’s phone number.

    I want to update that to a custom mautic field (maybe call it sitephonenumber).

    If the field “WordPress Phone” exists in WordPress User Fields, how do I pass it to the Mautic Field “sitephonenumber”?

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

    (@shulard)

    Hello !

    In the plugin, you have a wpmautic_tracking_attributes filter which allow you to control data sent inside the Mautic tracking event.

    You can update or add data inside the given array :

    
    add_filter('wpmautic_tracking_attributes', function(array $attributes) {
        $phone = …; //whatever logic required to retrieve the phone number
    
        $attributes['sitephonenumber'] = $phone;
    
        return $attributes;
    });
    

    This piece of code can be added inside a plugin or a theme.

    • This reply was modified 4 years, 9 months ago by shulard.
Viewing 1 replies (of 1 total)
  • The topic ‘Update Other Mautic Fields From WP Fields?’ is closed to new replies.