Last active
February 4, 2019 23:17
-
-
Save bekarice/a5cc3ea7ee7ec329629d to your computer and use it in GitHub Desktop.
Remove SKUs from WooCommerce product page display
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Remove SKUs from frontend product pages for admin-only use | |
function skyverge_unhook_product_page_skus( $enabled ) { | |
// Only remove SKUs if we're not in the admin & on a product page | |
if ( ! is_admin() && is_product() ) { | |
return false; | |
} | |
return $enabled; | |
} | |
add_filter( 'wc_product_sku_enabled', 'skyverge_unhook_product_page_skus' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment