This function retrieves all CRM tags currently associated with the user.

#Get the current user’s tags

$tags = wpf_get_tags();

#Get the tags for a different user

$tags = wpf_get_tags( $user_id );

#Force an update of the user’s tags by sending an API call to your CRM

In this case the updated tag list will automatically be saved to the local user meta after it’s been retrieved.

$tags = wpf_get_tags( $user_id, true );

#Display the current user’s tags in a list

$tags = wpf_get_tags();

echo '<ul>';
foreach ( $tags as $tag ) {
	echo '<li>' . wpf_get_tag_label( $tag ) . '</li>';
echo '</ul>';

Was this helpful?