Skip to content

Commit

Permalink
fix: child category is not showing in hierarchically (#509)
Browse files Browse the repository at this point in the history
  • Loading branch information
saimonh3 authored and sabbir1991 committed Jan 10, 2019
1 parent dd76714 commit 51f2338
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/class.category-walker.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {
$commission_val = dokan_get_seller_percentage( dokan_get_current_user_id(), $this->post_id, $category->term_id );
$commission_type = dokan_get_commission_type( dokan_get_current_user_id(), $this->post_id, $category->term_id );

$pad = str_repeat( ' ', $depth * 3 );
$cat_name = apply_filters( 'list_cats', $category->name, $category );

$output .= "\t<option class=\"level-$depth\" value=\"" . $category->term_id . "\"";
$output .= ' data-commission="' . $commission_val . '" data-commission_type="' . $commission_type . '"';
if ( $category->term_id == $args['selected'] )
$output .= ' selected="selected"';
$output .= '>';
$output .= $cat_name;
$output .= $pad . $cat_name;
$output .= "</option>\n";
}

Expand Down

0 comments on commit 51f2338

Please sign in to comment.