Skip to content

Instantly share code, notes, and snippets.

@balos1
Created November 19, 2014 05:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save balos1/151883ad672a6d2b55c6 to your computer and use it in GitHub Desktop.
Save balos1/151883ad672a6d2b55c6 to your computer and use it in GitHub Desktop.
De-SKU Woocommerce
<?php
/**
* Plugin Name: De-SKU-Woo
* Plugin URI: https://github.com/cojomojo/De-SKU-Woo
* Description: Remove the SKU from Woocommerce products.
* Version: 0.1
* Author: Cody Balos
* Author URI: https://github.com/cojomojo
* License: MIT
*
*/
/**
* Remove "SKU" from a single product page.
*/
add_filter( 'wc_product_sku_enabled', 'de_SKU_woo' );
function de_SKU_woo( $boolean ) {
if ( is_single() ) {
$boolean = false;
}
return $boolean;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment