Skip to content

Instantly share code, notes, and snippets.

@patrickposner
Created February 27, 2018 15:26
Show Gist options
  • Save patrickposner/6dadb58fd99b0cb7b5b263fb73800342 to your computer and use it in GitHub Desktop.
Save patrickposner/6dadb58fd99b0cb7b5b263fb73800342 to your computer and use it in GitHub Desktop.
remove woocommerce customizer panels
add_action('woocommerce_loaded','remove_woo_customizer_options');
function remove_woo_customizer_options() {
$woo_customizer = new WC_Shop_Customizer();
remove_action( 'customize_register', array( $woo_customizer, 'add_sections' ) );
remove_action( 'customize_controls_print_styles', array( $woo_customizer, 'add_styles' ) );
remove_action( 'customize_controls_print_scripts', array( $woo_customizer, 'add_scripts' ), 30 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment