Skip to content

Commit

Permalink
woocommerce_product_categories_widget_product_terms_args filter
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley committed Mar 14, 2016
1 parent c573a5b commit df75080
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/widgets/class-wc-widget-product-categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function widget( $args, $instance ) {

} elseif ( is_singular( 'product' ) ) {

$product_category = wc_get_product_terms( $post->ID, 'product_cat', array( 'orderby' => 'parent' ) );
$product_category = wc_get_product_terms( $post->ID, 'product_cat', apply_filters( 'woocommerce_product_categories_widget_product_terms_args', array( 'orderby' => 'parent' ) ) );

if ( $product_category ) {
$this->current_cat = end( $product_category );
Expand Down

0 comments on commit df75080

Please sign in to comment.