Update / increment stock quantity on import

Plugin Author


Hi @rosalitoudtohan,

Please update to the latest version 1.9.3 and add this code snippet to your site. It will add any quantities from your imported CSV file instead of replacing them.

add_filter('mewz_wcas_import_data', function($data, $stock, $row) {
    if (isset($data['quantity']) && $stock->exists()) {
        $data['quantity'] += $stock->quantity();

    return $data;
}, 10, 3);

Keep in mind you only need a title or sku column and a quantity column in your CSV file if you’re just updating stock quantities.


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer