Created
April 7, 2017 13:30
-
-
Save gagimilicevic/a1f788daaee1a2a80c95479116084116 to your computer and use it in GitHub Desktop.
Unregister Woocommerce price widget and register custom widget
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
//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