Created
November 15, 2019 17:38
-
-
Save mgibbs189/2844b4b4a2967fa2f97c3c3563ba9cf4 to your computer and use it in GitHub Desktop.
User Post Type - force a sync every 8 hours
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 | |
add_action( 'mysite_sync_users', [ UPT()->sync, 'run_sync' ] ); | |
if ( ! wp_next_scheduled( 'mysite_sync_users' ) ) { | |
wp_schedule_single_event( time() + 28800, 'mysite_sync_users' ); // every 8 hours | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment