parent
25e02ac6f1
commit
9dea16ab6c
|
@ -92,7 +92,7 @@ class WC_Product_Cat_Dropdown_Walker extends Walker {
|
|||
* @return null Null on failure with no changes to parameters.
|
||||
*/
|
||||
public function display_element( $element, &$children_elements, $max_depth, $depth = 0, $args, &$output ) {
|
||||
if ( ! $element || 0 === $element->count ) {
|
||||
if ( ! $element || ( 0 === $element->count && ! empty( $args['hide_empty'] ) ) ) {
|
||||
return;
|
||||
}
|
||||
parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );
|
||||
|
|
|
@ -138,7 +138,7 @@ class WC_Product_Cat_List_Walker extends Walker {
|
|||
* @return null Null on failure with no changes to parameters.
|
||||
*/
|
||||
public function display_element( $element, &$children_elements, $max_depth, $depth = 0, $args, &$output ) {
|
||||
if ( ! $element || 0 === $element->count ) {
|
||||
if ( ! $element || ( 0 === $element->count && ! empty( $args['hide_empty'] ) ) ) {
|
||||
return;
|
||||
}
|
||||
parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );
|
||||
|
|
Loading…
Reference in New Issue