Viewing 1 replies (of 1 total)
  • Plugin Author WP All Import

    (@wpallimport)

    Hi @era85

    how I can make it just for one import ID job not for all, have different suppliers on different jobs.

    The code examples on the page you linked to show how to do that. Basically you just wrap your code in an IF conditional that checks the $import_id argument. For example:

    function my_is_post_to_create( $continue_import, $data, $import_id ) {
        
        if ( $import_id == 5 ) {
            // check for duplicate SKU here and return FALSE if there is one.
        }
        return TRUE;
    }
    
    add_filter('wp_all_import_is_post_to_create', 'my_is_post_to_create', 10, 3);
    • This reply was modified 4 years, 9 months ago by WP All Import.
Viewing 1 replies (of 1 total)
  • The topic ‘Duplicate SKU just for one import’ is closed to new replies.