Get WP All Export row ID

We’ve got a solution from plugin’s developers:

  1. Add this code to theme’s functions.php file

// run a function before export starts, it deletes counter value from DB
add_action('pmxe_before_export', 'wp_all_export_pmxe_before_export', 10, 1);
function wp_all_export_pmxe_before_export($export_id)
{
delete_option('wp_all_export_current_row');
}

  1. Add this to All Export plugin’s Edit Export screen under ” Export the value returned by a PHP function” section

// update counter value while exporting
function get_row_number()
{
$current = get_option('wp_all_export_current_row', 1);
update_option('wp_all_export_current_row', $current + 1);
return $current;
}