Hi,
I assume the SKU field is added later on during the import. So the import probably creates the product, then saves it – at that point the item is already indexed. Then adds the custom field, which does not trigger the re-indexing.
If the regular update or add post meta functions are used for the indexing, then maybe a custom code could work.
add_action( 'updated_post_meta', 'asp_force_index_on_meta_save', 10, 2 );
add_action( 'added_post_meta', 'asp_force_index_on_meta_save', 10, 2 );
function asp_force_index_on_meta_save( $meta_id, $object_id ) {
$o = new WD_ASP_IndexTable_Action();
$o->update( $object_id, null, true );
}
Try adding this code to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.
Note, that this should only start working on new imports.