Merge pull request #11168 from zakalwe2016/master
Add Filters For Product Lists in Widgets
This commit is contained in:
commit
e0bfe9f9fa
|
@ -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 );
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue