Created
July 22, 2022 08:33
-
-
Save verygoodplugins/ffaf723ef190b7dcb2c17e0d8db0ac22 to your computer and use it in GitHub Desktop.
When a user registers in WordPress, applies a tag in the CRM with their username
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function tag_based_on_username( $user_id ) { | |
$user = get_user_by( 'id', $user_id ); | |
wp_fusion()->user->apply_tags( array( $user->user_login ), $user_id ); | |
} | |
add_action( 'wpf_user_created', 'tag_based_on_username' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment