Remove SKU on Woocommerce

0
240

Another problem that i was currently working on a WooCommerce site was to remove the SKU code from the actual product display.

To do this i have used the filter from WooCommerce wp_product_sku_enabled.

The function bellow will disable the SKU for products on other pages that are not in the admin.

function remove_product_sku( $enabled ) {
    if ( ! is_admin() && is_product() ) {
        return false;
    }

    return $enabled;
}
add_filter( 'wc_product_sku_enabled', 'remove_product_page_sku' );

LEAVE A REPLY

Please enter your comment!
Please enter your name here