When you use automatic product imports via WP All import for example, you have to manually init variations every time. As this is quite annoying please add the following code into your functions.php:

 function after_xml_import( $import_id, $import ) {
    $admin = new WooCommerce_Single_Variations_Admin('plugin', '1.3.19');
    $admin->update_variations(false, true);
$admin->reset_transients(false);
} add_action( 'pmxi_after_xml_import', 'after_xml_import', 10, 2 );

This will ensure all variations are reinitiated after import.

5 thoughts on “Init Variations after WP All Import

  1. Shoaib says:

    Currently When I am manually doing the INIT it is stuck at some point and not showing all the products variations on the front, what will be a quick fix for that? cant do the import again.

Leave a Reply

Your email address will not be published.