WordPress at Your Fingertips
function is not described

WC_Product_Cat_Dropdown_Walker::display_element() public WC 2.5.0

Traverse elements to create list from elements.

Display one element if the element doesn't have any children otherwise, display the element and its children. Will only traverse up to the max. depth and no ignore elements under that depth. It is possible to set the. max depth to include all depths, see walk() method.

This method shouldn't be called directly, use the walk() method instead.

{} It's a method of the class: WC_Product_Cat_Dropdown_Walker{}

No Hooks.


null. Nothing.


$WC_Product_Cat_Dropdown_Walker = new WC_Product_Cat_Dropdown_Walker();
$WC_Product_Cat_Dropdown_Walker->display_element( $element, $children_elements, $max_depth, $depth, $args, $output );
$element(object) (required)
Data object.
$children_elements(array) (required) (passed by reference — &)
List of elements to continue traversing.
$max_depth(int) (required)
Max depth to traverse.
$depth(int) (required)
Depth of current element.
$args(array) (required)
$output(string) (required) (passed by reference — &)
Passed by reference. Used to append additional content.


Since 2.5.0 Introduced.

Code of WC_Product_Cat_Dropdown_Walker::display_element() WC 5.9.0

public function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) {
	if ( ! $element || ( 0 === $element->count && ! empty( $args[0]['hide_empty'] ) ) ) {
	parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );