PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.6.2
ShopBuilder – WooCommerce Builder For Elementor v2.6.2
3.4.2 3.4.1 3.4.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 All 63 releases
← All changes | app/Models/QueryArgs.php +7 -2 2.1.42.6.2 View file →
@@ -93,9 +93,9 @@
93 93 }
94 94
95 95 if ( $post_not_in ) {
96 96 $post_not_in = explode( ',', $post_not_in );
97 - $this->args['exclude'] = $post_not_in;
97 + $this->args['exclude'] = $post_not_in; // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude
98 98 }
99 99
100 100 if ( $author_in ) {
101 101 $this->args['author'] = $author_in;
@@ -134,9 +134,9 @@
134 134 }
135 135
136 136 if ( $cats_not_in ) {
137 137 $cats_not_in = array_filter( explode( ',', $cats_not_in ) );
138 - $this->args['exclude'] = $cats_not_in;
138 + $this->args['exclude'] = $cats_not_in; // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude
139 139 }
140 140
141 141 $this->args['number'] = $limit;
142 142 $this->args['hide_empty'] = $this->meta['show_empty'] ? 0 : 1;
@@ -187,8 +187,13 @@
187 187 $this->args['orderby'] = $order_by;
188 188
189 189 if ( 'menu_order' === $order_by ) {
190 190 $this->args['orderby'] = 'menu_order title';
191 + }
192 +
193 + if ( 'price' === $order_by ) {
194 + $this->args['orderby'] = 'meta_value_num';
195 + $this->args['meta_key'] = '_price'; // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key
191 196 }
192 197 }
193 198
194 199 return $this;