Woocommerce – How to use same sku multiple times

How i've bypassed the error message: The SKU already exists on another product.

The solution

You can allow multiple sku’s just by deactivating the sku unique check from WooCommerce. To do so, just add the following line into your functions.php


add_filter( 'wc_product_has_unique_sku', '__return_false', PHP_INT_MAX );
Deactivating sku check in the functions.php

 

How i came into contact with

I have used this in a Project where i’ve used Polylang. WooCommerce was shouting because the translations had both the same sku. After adding this, i had no problems at all. Because of this i would recommend it to you.