@@ 74-88 (lines=15) @@ | ||
71 | ||
72 | $r = new WP_Query( $query_args ); |
|
73 | ||
74 | if ( $r->have_posts() ) { |
|
75 | ||
76 | $this->widget_start( $args, $instance ); |
|
77 | ||
78 | echo '<ul class="product_list_widget">'; |
|
79 | ||
80 | while ( $r->have_posts() ) { |
|
81 | $r->the_post(); |
|
82 | wc_get_template( 'content-widget-product.php' ); |
|
83 | } |
|
84 | ||
85 | echo '</ul>'; |
|
86 | ||
87 | $this->widget_end( $args ); |
|
88 | } |
|
89 | ||
90 | wp_reset_postdata(); |
|
91 |
@@ 73-87 (lines=15) @@ | ||
70 | ||
71 | $r = new WP_Query( $query_args ); |
|
72 | ||
73 | if ( $r->have_posts() ) { |
|
74 | ||
75 | $this->widget_start( $args, $instance ); |
|
76 | ||
77 | echo '<ul class="product_list_widget">'; |
|
78 | ||
79 | while ( $r->have_posts() ) { |
|
80 | $r->the_post(); |
|
81 | wc_get_template( 'content-widget-product.php', array( 'show_rating' => true ) ); |
|
82 | } |
|
83 | ||
84 | echo '</ul>'; |
|
85 | ||
86 | $this->widget_end( $args ); |
|
87 | } |
|
88 | ||
89 | remove_filter( 'posts_clauses', array( WC()->query, 'order_by_rating_post_clauses' ) ); |
|
90 |