Vcard

Overview

With this extension, users can conveniently generate a VCard upon registering and after updating their profile. The process is made hassle-free as they can easily download the VCard.vcf file, ensuring that their contact information is readily available in a universally compatible format. This seamless integration not only simplifies the user experience but also provides a practical solution for sharing and storing contact details. Say goodbye to manual data entry and hello to efficiency with the automatic VCard generation feature.

Note: The VCard file must be generated by updating the User Profile. Until this update, there is no VCard file available.
Download: In UM Extended 2.0.3 under the Assets, click on the Source code(zip) to download the zip file.

Setup

After activating the plugin, you must add the predefined field to the Profile Form. Edit the profile form by going to wp-admin>Ultimate Member>Forms>Edit Profile Form. To add a field, click the plus "+" sign button in the form builder

Select VCard in the predefined fields from the fields manager and click the Update button to save changes

When a user registers or saves their profile, a VCard.vcf file is generated, and a VCard icon is shown in their profile allowing users to download the file. The VCard or.vcf file may be imported into the Contacts Application on Mac OS, Google Contacts, and Outlook on Windows OS.

The VCard field will appear or will be generated on the user's profile only when the user edits and updates their profile.

The sample image below is the downloaded Vcard from the site and imported in Google Contacts

Action hook

You can use the action hook  um_vcard_before_save to add extra fields to the VCard. See the example below:

add_action('um_vcard_before_save','um_vcard_add_nickname', 10, 2 ); 
function um_vcard_add_nickname( $vcard_obj, $user_id ){    
	$vcard_obj->add( new Nickname( um_user('nickname' ) ) ); 
}