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 | |
// This runs every day and imports any new users from the connected CRM who have the specified tag ID ("123" in this example) | |
// If contacts with that tag already have user accounts on the site they will be skipped and no data will be loaded | |
// i.e. this just imports *new* users | |
if ( ! wp_next_scheduled( 'wpf_daily_import' ) ) { | |
wp_schedule_event( time(), 'daily', 'wpf_daily_import' ); | |
} |