wc_walk_category_dropdown_tree

Walk the Product Categories.

Description

wc_walk_category_dropdown_tree(); 

Usage

  1. if ( !function_exists( 'wc_walk_category_dropdown_tree' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-term-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wc_walk_category_dropdown_tree(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-term-functions.php  
  1. function wc_walk_category_dropdown_tree() { 
  2. $args = func_get_args(); 
  3.  
  4. if ( ! class_exists( 'WC_Product_Cat_Dropdown_Walker', false ) ) { 
  5. include_once( WC()->plugin_path() . '/includes/walkers/class-product-cat-dropdown-walker.php' ); 
  6.  
  7. // the user's options are the third parameter 
  8. if ( empty( $args[2][walker] ) || ! is_a( $args[2][walker], 'Walker' ) ) { 
  9. $walker = new WC_Product_Cat_Dropdown_Walker; 
  10. } else { 
  11. $walker = $args[2][walker]; 
  12.  
  13. return call_user_func_array( array( &$walker, 'walk' ), $args );