+function custom_trigger_scheduled_export_url() {
+ $secret_key = ( isset( $_GET['secret_key'] ) ? sanitize_text_field( $_GET['secret_key'] ) : false );
+ if( empty( $secret_key ) ) {
+ if( $secret_key == 'SECRET_KEY_PASSED_VIA_CRON' ) {
+ // This is the Post ID of the Scheduled Export you wish to trigger
+ $scheduled_export = 100;
+ $time = current_time( 'timestamp', 1 );
+ $hook = 'woo_ce_auto_export_schedule_' . $scheduled_export;
+ 'id' => $scheduled_export
+ wp_schedule_single_event( $time, $hook, $args );
+add_action( 'init', 'custom_trigger_scheduled_export_url', 11 );