Merge pull request #11168 from zakalwe2016/master

Add Filters For Product Lists in Widgets
This commit is contained in:
Claudio Sanches 2016-07-27 12:15:20 -03:00 committed by GitHub
commit e0bfe9f9fa
2 changed files with 4 additions and 4 deletions

View File

@ -75,14 +75,14 @@ class WC_Widget_Recently_Viewed extends WC_Widget {
$this->widget_start( $args, $instance ); $this->widget_start( $args, $instance );
echo '<ul class="product_list_widget">'; echo apply_filters( 'woocommerce_before_widget_product_list', '<ul class="product_list_widget">' );
while ( $r->have_posts() ) { while ( $r->have_posts() ) {
$r->the_post(); $r->the_post();
wc_get_template( 'content-widget-product.php' ); wc_get_template( 'content-widget-product.php' );
} }
echo '</ul>'; echo apply_filters( 'woocommerce_after_widget_product_list', '</ul>' );
$this->widget_end( $args ); $this->widget_end( $args );
} }

View File

@ -74,14 +74,14 @@ class WC_Widget_Top_Rated_Products extends WC_Widget {
$this->widget_start( $args, $instance ); $this->widget_start( $args, $instance );
echo '<ul class="product_list_widget">'; echo apply_filters( 'woocommerce_before_widget_product_list', '<ul class="product_list_widget">' );
while ( $r->have_posts() ) { while ( $r->have_posts() ) {
$r->the_post(); $r->the_post();
wc_get_template( 'content-widget-product.php', array( 'show_rating' => true ) ); wc_get_template( 'content-widget-product.php', array( 'show_rating' => true ) );
} }
echo '</ul>'; echo apply_filters( 'woocommerce_after_widget_product_list', '</ul>' );
$this->widget_end( $args ); $this->widget_end( $args );
} }