• I don’t use SKU so I didn’t fill out the SKU fields in the products. This works fine for me, because they are not shown in the frontend, if I leave them empty. Except for variable products – the SKU is shown as not avaiable if I do not enter one. That’s odd and I think this is a bug isn’t it? Can you pls fix it?

    https://wordpress.org/plugins/woocommerce/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Looks like the option was removed. The code now call the wc_product_sku_enabled() function.

    You can add this code to your theme’s functions.php file to remove the sku from the display:

    add_filter('wc_product_sku_enabled', 'growdev_disable_sku');
    function growdev_disable_sku ( $val ) {
    return false;
    }

    An even more concise way to do this:

    // Disable Product SKU
    add_filter('wc_product_sku_enabled', '__return_false');

    h/t Mike Jolley

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Empty SKU shown only on variable product’ is closed to new replies.