PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 3.2.1
ShopBuilder – WooCommerce Builder For Elementor v3.2.1
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 +10 -0 2.3.03.2.1 View file →
@@ -188,8 +188,13 @@
188 188
189 189 if ( 'menu_order' === $order_by ) {
190 190 $this->args['orderby'] = 'menu_order title';
191 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
196 + }
192 197 }
193 198
194 199 return $this;
195 200 }
@@ -269,13 +274,18 @@
269 274 * @return void
270 275 */
271 276 private function tax_params(): void {
272 277 $categories = isset( $this->meta['categories'] ) ? array_filter( $this->meta['categories'] ) : [];
278 + $brands = isset( $this->meta['brands'] ) ? array_filter( $this->meta['brands'] ) : [];
273 279 $tags = isset( $this->meta['tags'] ) ? array_filter( $this->meta['tags'] ) : [];
274 280 $attributes = isset( $this->meta['attributes'] ) ? array_filter( $this->meta['attributes'] ) : [];
275 281
276 282 if ( ! empty( $categories ) ) {
277 283 $this->args['product_category_id'] = $categories;
284 + }
285 +
286 + if ( ! empty( $brands ) ) {
287 + $this->args['product_brand_id'] = $brands;
278 288 }
279 289
280 290 if ( ! empty( $tags ) ) {
281 291 $this->args['product_tag_id'] = $tags;