Hide the Sku in WooCommerce –

The SKU or reference number is an optional element in WooCommerce products, it is generally used to put IBAN codes or similar, which can be easily removed if you do not want to show it.

Hosting Mautic QuickStart -50% with support in Spanish
24 hours and free training

Send up to 1,000,000 emails/year. Mautic support in Spanish 24 hours, 365 days

Hide SKU in woocommerce completely

To hide the SKU in WooCommerce from anywhere, even in the editor, in the product data, simply add the following code to the functions.php file, in this case you can place it in:

/** Never show the SKU **/ add_filter( ‘wc_product_sku_enabled’, ‘__return_false’ );

Or, if you prefer, there is a plugin that does the exact same thing:

Hide SKU in woocommerce only on product page.

Now, if you want to still use the SKU for your internal details, but don’t want it to show on the product page, then the code is this:

/* Do not display SKUs on product pages */ function we_remove_product_page_sku( $enabled ) { if ( ! is_admin() && is_product() ) { return false; } return $enabled; } add_filter( ‘wc_product_sku_enabled’, ‘we_remove_product_page_sku’ );

And another variation of using this filter, if you prefer, would be applying the change to the entire store from the visitor’s point of view:

/* Remove the SKU directly in the store */ add_action(‘woocommerce_before_single_product_summary’, function() { add_filter(‘wc_product_sku_enabled’, ‘__return_false’); });

And lastly, another way to do it would be to hide your display using CSS, by adding the following code in:

Appearance > Customize > additional css

//hide SKU .sku_wrapper { display:none; }

See also  Meta description in the SERP

With this we would have already deactivated said sku.

Help us improve our content by sharing your opinion

WordPress and WooCommerce support team at .

Loading Facebook Comments ...
Loading Disqus Comments ...