How to Remove SKU From WooCommerce Product Detail Page
To remove the SKU from the product detail page in WooCommerce, you can achieve this using a simple custom code or a dedicated WordPress plugin. Here’s how you can remove the SKU without touching core WooCommerce files and use either a custom snippet or a plugin.
Method 1: Remove SKU via Using a Dedicated Plugin
If you’re not comfortable with custom code, you can use a plugin that allows easy customization of WooCommerce product pages without coding. One such plugin is Remove SKU From Product detail page.
Steps:
1. Install Remove SKU From Product detail page
- Go to Plugins > Add New.
- Search for “Remove SKU From Product detail page”.
- Install and activate the plugin.
- Go to the WooCommerce settings (typically under WooCommerce > Settings > SKU Settings).
- Select ‘Yes’ from the drop down list to hide it from product detail pages.
Method 2: Remove SKU via Your Theme’s functions.php (Advanced Users)
Steps:
1. Access Theme Editor or FTP
- Backup your functions.php file before making any changes.
- In your WordPress dashboard, go to Appearance > Theme File Editor.
- Select the functions.php file from the right sidebar.
2. Insert the Code
- Scroll to the bottom of the functions.php file and paste following code:
// Remove SKU from product pages in WooCommerce
add_filter( 'wc_product_sku_enabled', '__return_false' );
- Click Update File to save your changes.
Let me know if you need help with any of these methods!