How to update all products with same SKU prefixes when updating stock with CSV?

This how I finally made it to update duplicated product variations with ‘-2’ SKU suffix: function update_imported_product($object, $data) { if ($object->get_type() === ‘variation’){ $product_id = wp_get_post_parent_id($object->get_id()); } else { $product_id = $object->get_id(); } if(isset($product_id)) { $sku_in = get_post_meta($product_id, ‘_sku’, true); // Search and update variations with suffix -2 $args = array( ‘post_type’ => ‘product_variation’, ‘meta_query’ … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)