CiviCRM WordPress Member Sync plugin keeps a WordPress user in sync with a CiviCRM membership by granting either a role or capabilities to a WordPress user who has that membership.
The dry run option does not call civi_wp_member_sync_new_username during its simulation. So, the dry run would show usernames set as the default in the plugin as Display Name instead of what the filter might choose.
I'll submit a 1-line change pull request that does.
A better fix would probably be to pull out the username generation so it could be called for both simulation and sync code paths.
The dry run option does not call
civi_wp_member_sync_new_username
during its simulation. So, the dry run would show usernames set as the default in the plugin as Display Name instead of what the filter might choose.I'll submit a 1-line change pull request that does.
A better fix would probably be to pull out the username generation so it could be called for both simulation and sync code paths.