add parent parameter to product_categories shortcode

This commit is contained in:
James Koster 2012-12-14 15:23:37 +00:00
parent b5daf825a9
commit 790e349972
1 changed files with 4 additions and 2 deletions

View File

@ -127,7 +127,8 @@ function woocommerce_product_categories( $atts ) {
'orderby' => 'name',
'order' => 'ASC',
'columns' => '4',
'hide_empty' => 1
'hide_empty' => 1,
'parent' => ''
), $atts ) );
if ( isset( $atts[ 'ids' ] ) ) {
@ -144,7 +145,8 @@ function woocommerce_product_categories( $atts ) {
'orderby' => $orderby,
'order' => $order,
'hide_empty' => $hide_empty,
'include' => $ids
'include' => $ids,
'parent' => $parent
);
$product_categories = get_terms( 'product_cat', $args );