Wp All Import Duplicates Alone
-
I typically import daily jobs with wp all import + wp all import wp job manager plugin. But one problem that I figured out is sometimes the wp all import, imports 2 records twice.
As you can see, in my CSV we have only one line with that reference:
But the plugin, creates twice, as you can see:
I use the reference to avoid duplication, and I use this function too:
<?php function dont_duplicate_skus( $continue_import, $data, $import_id ) { $sku = $data['ref']; global $wpdb; $product_id = $wpdb->get_var( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key='ref' AND meta_value='%s' LIMIT 1", $sku ) ); if ( $product_id ) { return false; } else { return true; } } add_filter('wp_all_import_is_post_to_create', 'dont_duplicate_skus', 10, 3); ?>
How can I fix this?
Regards
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Wp All Import Duplicates Alone’ is closed to new replies.