Rohit
Rohit

Reputation: 75

How to customize product category widget in woocommerce

i can not understand How to customize product category widget in woocommerce Version 3.0.7 (not using any plugin). like that..
enter image description here

Upvotes: 5

Views: 10929

Answers (1)

Ahmed Ginani
Ahmed Ginani

Reputation: 6650

You can customize the arguments of product category widget by following code in functions.php,

add_filter( 'woocommerce_product_categories_widget_args', 'widget_arguments' );

function widget_arguments( $args ) {

$args['exclude'] = array('12','14');

return $args;
}

Here is the argument list from default file.

http://hookr.io/plugins/woocommerce/3.0.6/files/includes-widgets-class-wc-widget-product-categories/

Upvotes: 3

Related Questions