Skip to content

Instantly share code, notes, and snippets.

@gagimilicevic
Created April 7, 2017 13:30
Show Gist options
  • Save gagimilicevic/a1f788daaee1a2a80c95479116084116 to your computer and use it in GitHub Desktop.
Save gagimilicevic/a1f788daaee1a2a80c95479116084116 to your computer and use it in GitHub Desktop.
Unregister Woocommerce price widget and register custom widget
//Unregister Woocommerce widget and register custom widget for price filter
function override_woocommerce_widgets() {
if ( class_exists( 'WC_Widget_Price_Filter' ) ) {
unregister_widget( 'WC_Widget_Price_Filter' );
include get_template_directory() . '/inc/custom-widgets/dewploy-class-wc-widget-price-filter.php';
register_widget( 'Dewploy_WC_Widget_Price_Filter' );
}
}
add_action( 'widgets_init', 'override_woocommerce_widgets', 15 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment