• Resolved nickamis

    (@nickamis)


    Hi,

    I’ve managed to successfully implement the custom filter ‘mailchimp_sync_should_sync_user’ to limit which users get synced and added more fields using ‘mailchimp_sync_user_data’.

    What I need to understand is how to ensure that changes to non-user fields get synced when they change. For instance, I’ve synced a field which is the Users total number of loyalty points earned which not held in usermeta.

    How can I ensure that when the sync runs each hour these changes will be picked up? Do I need to update the ‘last updated’ field of the user?

    Thanks, Nick

Viewing 1 replies (of 1 total)
  • Plugin Author Danny van Kooten

    (@dvankooten)

    Hi Nick,

    You can update any of the user meta fields using the update_user_meta function in WordPress and the plugin should pick up on it. Alternatively, you can just fire the relevant action hook that the plugin hooks into.

    
    do_action( 'updated_user_meta', 'meta-key', $user_id, 'meta-value' );
    

    The meta-key and meta-valu arguments are not relevant in this example, you can set this to any non-empty value and it should still work.

    Cheers!

Viewing 1 replies (of 1 total)
  • The topic ‘Trigger sync for fields non-user fields’ is closed to new replies.