Skip record
-
Hello ,
I want to add a function to skip certain records that have a custom value but this function must run for a particular import id.i added this code , but even if i run another import id , for example import id 20 , the function fires.
even if i havent add the custom value still fires.what am i doing wrong ?
function is_post_to_update($continue_import, $postid, $data, $import_id) { // Retrieve the import ID while the import is running. $import_id = wp_all_import_get_import_id(); // Check for your import if ($import_id == 18) { $do_not_update = get_post_meta($postid, 'do_not_update', true); if ($do_not_update == true) { return false; } return true; } } add_filter('wp_all_import_is_post_to_update', 'is_post_to_update', 10, 4);
Thank you.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Skip record’ is closed to new replies.