• Hello,
    Very simple use case, I would like to show a filter by product category (Woocommerce) using checkboxes, I would like to show all product categories, including empty ones. Is this possible?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author RazyRx

    (@razyrx)

    Hello,

    By default plugin remove all values from filter that do not have products at all and it can be changed only with help of custom code.

    Regards,
    Oleg

    Thread Starter Oded Talmon

    (@odedta)

    Is there a filter for that? couldn’t find it in the documentation.
    Thanks!

    Plugin Author RazyRx

    (@razyrx)

    Hello,

    You can use hook berocket_aapf_get_terms_class_args to modify argument that uses for get_terms function.

    Regards,
    Oleg

    Thread Starter Oded Talmon

    (@odedta)

    Hello again and thanks for the reference!

    I’ve tried:

    function cs_berocket_aapf_get_terms_class_args( $args, $additional ) {
    	$args['hide_empty'] = false;
    	
    	return $args;
    }
    add_filter( 'berocket_aapf_get_terms_class_args', 'cs_berocket_aapf_get_terms_class_args', 10, 2 );

    It didn’t work, what should I do?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Show all categories’ is closed to new replies.