-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathpmxe_after_iteration.php
More file actions
33 lines (27 loc) · 916 Bytes
/
pmxe_after_iteration.php
File metadata and controls
33 lines (27 loc) · 916 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
* =======================================
* Action: pmxe_after_iteration
* =======================================
*
* Runs after each cron processing iteration finishes.
*
*
* @param $export_id int - The export ID.
* @param $exportObj object - The export object.
*
*/
add_action( 'pmxe_after_iteration', 'wpae_continue_cron', 10, 2 );
function wpae_continue_cron( $export_id, $exportObj ) {
// Do something.
}
//
// Example: Make a cron export run continuously.
//
add_action( 'pmxe_after_iteration', 'wpae_continue_cron', 10, 2 );
function wpae_continue_cron( $export_id, $exportObj ) {
if ( $export_id == '12' ) { // change this to your export ID
$cron_processing_url = 'http://lame-addax-cat.w6.wpsandbox.pro/wp-cron.php?export_key=g99mni1B6Kpu&export_id=12&action=processing'; // change to your real processing URL
header( "Location: " . $cron_processing_url . "" );
}
}