[2.5] Fix hide empty check

Fixes #10279
This commit is contained in:
Mike Jolley 2016-02-05 12:31:50 +00:00
parent 54260cf7a4
commit d3472a6207
2 changed files with 2 additions and 2 deletions

View File

@ -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 && ! empty( $args['hide_empty'] ) ) ) {
if ( ! $element || ( 0 === $element->count && ! empty( $args[0]['hide_empty'] ) ) ) {
return;
}
parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );

View File

@ -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 && ! empty( $args['hide_empty'] ) ) ) {
if ( ! $element || ( 0 === $element->count && ! empty( $args[0]['hide_empty'] ) ) ) {
return;
}
parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );