PluginProbe
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO / 1.4.14
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO v1.4.14
1.4.14 1.4.13 1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 1.4.6 1.4.5 1.4.4 1.4.3 1.4.2 1.4.1 1.4.0 1.3.54 1.3.53 1.3.52 1.3.51 1.3.50 1.3.49 1.3.48 1.3.47 1.3.46 1.3.45 All 177 releases
disco / app / DropDown / DropDown.php

DropDown.php in Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO 1.4.14, at app/DropDown/DropDown.php

684 lines 24.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php // phpcs:ignore
2 namespace Disco\App\DropDown;
3
4 use Disco\App\Disco;
5
6 /**
7 * Class DropDown
8 *
9 * @package CTXFeed
10 * @subpackage app\DropDown
11 * @author Ohidul Islam <wahid0003@gmail.com>
12 * @link https://webappick.com
13 * @license https://opensource.org/licenses/gpl-license.php GNU Public License
14 * @category MyCategory
15 */
16 class DropDown { // phpcs:ignore
17
18 /**
19 * Conditions.
20 *
21 * @param string $type Condition Type to compare. Acceptable values:
22 * 'string' string type conditions
23 * 'number' number type conditions
24 * 'date' date type conditions
25 * 'select' list type conditions.
26 * @param string|array $key Condition Key to get specific condition.
27 * @return array
28 */
29 public static function conditions( $type = null, $key = null ) { // phpcs:ignore
30 $condition = array(
31 'equal' => 'Equal',
32 'not_equal' => 'Not Equal',
33 'contain' => 'Contain',
34 'not_contain' => 'Does Not Contain',
35 'start_with' => 'Start With',
36 'end_with' => 'End With',
37 'greater' => 'Greater Than',
38 'greater_equal' => 'Greater Than or Equal',
39 'lesser' => 'Less Than',
40 'lesser_equal' => 'Less Than or Equal',
41 'between' => 'Between',
42 'date_between' => 'Date Between',
43 // 'within_past' => 'Within Past',
44 // 'earlier_than' => 'Earlier Than',
45 'in_list' => 'In List',
46 'not_in_list' => 'Not In List',
47 );
48
49 if ( 'string' === $type ) {
50 unset(
51 $condition['in_list'],
52 $condition['not_in_list'],
53 $condition['greater'],
54 $condition['greater_equal'],
55 $condition['lesser'],
56 $condition['lesser_equal'],
57 $condition['between'],
58 $condition['date_between']
59 );
60 }
61
62 if ( 'number' === $type ) {
63 unset(
64 $condition['in_list'],
65 $condition['not_in_list'],
66 $condition['date_between'],
67 $condition['start_with'],
68 $condition['end_with'],
69 $condition['contain'],
70 $condition['not_contain']
71 );
72 }
73
74 if ( 'select' === $type ) {
75 if ( isset( $key['multiple'] ) && $key['multiple'] === false ) {
76 unset(
77 $condition['contain'],
78 $condition['not_contain'],
79 $condition['in_list'],
80 $condition['not_in_list'],
81 $condition['greater'],
82 $condition['greater_equal'],
83 $condition['lesser'],
84 $condition['lesser_equal'],
85 $condition['between'],
86 $condition['date_between'],
87 $condition['start_with'],
88 $condition['end_with']
89 );
90 } else {
91 unset(
92 $condition['contain'],
93 $condition['not_contain'],
94 $condition['equal'],
95 $condition['not_equal'],
96 $condition['greater'],
97 $condition['greater_equal'],
98 $condition['lesser'],
99 $condition['lesser_equal'],
100 $condition['between'],
101 $condition['date_between'],
102 $condition['start_with'],
103 $condition['end_with']
104 );
105 }
106 }
107
108 if ( 'date' === $type ) {
109 unset(
110 $condition['in_list'],
111 $condition['not_in_list'],
112 $condition['contain'],
113 $condition['not_contain'],
114 $condition['start_with'],
115 $condition['end_with'],
116 $condition['between']
117 );
118 }
119
120 if ( is_array( $condition ) ) {
121 return $condition;
122 }
123
124 return array();
125 }
126
127 /**
128 * Prepare Filters for frontend appearance.
129 *
130 * @param string $title Filter Title.
131 *
132 * @param string $condition_type Condition Type to compare. Acceptable values:
133 * 'string' string type conditions
134 * 'number' number type conditions
135 * 'date' date type conditions
136 * 'date' date type conditions
137 * 'select' list type conditions.
138 *
139 * @param string|array $input_type Input Filed for compare value. Acceptable values:
140 * 'text' for input[type=text]
141 * 'number' for input[type=number]
142 * 'date' for input[type=datetime-local]
143 *
144 * For 'select' dropdown, there are two options available:
145 *
146 * For manual options:
147 * [
148 * 'type' => 'select',
149 * 'option_type' => 'manual',
150 * 'multiple' => true,
151 * 'options' => ['key' => 'value']
152 * ]
153 * OR For api options:
154 * [
155 * 'type' => 'select',
156 * 'option_type' => 'api',
157 * 'multiple' => true,
158 * 'endpoint' => 'https://example.com/api/endpoint'
159 * ].
160 *
161 * @param string $component Component to load into frontend. Acceptable values:
162 * 'string' for string type conditions
163 * 'number' for number type conditions
164 * 'date' for date type conditions
165 * 'select' for list type conditions.
166 *
167 * @param bool $disable Disable filter. Default is false.
168 * @return array Filter Array
169 * [0]=>[
170 * [optionGroup] => Filter Group Title,
171 * [options] => [
172 * 'attribute' => [ // Attribute key to compare with. Example: 'id',
173 * 'title', 'sku'.
174 * 'title' => 'Filter Title',
175 * 'component' => 'string',
176 * 'condition' => [available conditions from self::Conditions()]
177 * 'input_type' => 'text',
178 * 'fields' => [
179 * 'compare' => '',
180 * 'condition' => '',
181 * 'compare_with' => '',
182 * 'operator' => '',
183 * ]
184 * ]
185 * ]
186 * ].
187 */
188 public static function prepare_filters(
189 $title,
190 $condition_type = 'string',
191 $input_type = 'text',
192 $component = 'string',
193 $disable = false
194 ) {
195 $fields = array(
196 'compare' => '',
197 'condition' => '',
198 'compare_with' => '',
199 'operator' => '',
200 );
201
202 return array(
203 'title' => $title,// phpcs:ignore
204 'component' => $component,
205 'condition' => self::Conditions( $condition_type, $input_type ),
206 'input_type' => $input_type, // Input Filed Type. Example values -> HTML Input Type
207 'fields' => $fields,
208 'disable' => $disable,
209 );
210 }
211
212 /**
213 * Get All Filters.
214 * Check the phpdoc comments of prepare_filters() method for details.
215 *
216 * @return array
217 * @throws \Exception If the search term is not set.
218 */
219 public static function filters() { // phpcs:ignore
220 $filter_attributes = array();
221
222 $primary_attributes = array(
223 'optionGroup' => __( 'Product/Cart Item', 'disco' ),
224 'options' => array(
225 'id' => self::prepare_filters( 'ID', 'number', 'number' ),
226 'parent_id' => self::prepare_filters( 'Parent ID', 'number', 'number', 'number', ! Disco::is_pro() ),
227 'sku' => self::prepare_filters( 'SKU' ),
228 'title' => self::prepare_filters( 'Title' ),
229 'description' => self::prepare_filters( 'Description' ),
230 'short_description' => self::prepare_filters( 'Short Description' ),
231 'attributes' => self::prepare_filters(
232 'Attributes',
233 'select',
234 array(
235 'type' => 'select',
236 'option_type' => 'api',
237 'multiple' => true,
238 'endpoint' => get_site_url( null, '/wp-json/disco/v1/search/attribute/?search=' ),
239 )
240 ),
241 'categories' => self::prepare_filters(
242 'Categories',
243 'select',
244 array(
245 'type' => 'select',
246 'option_type' => 'api',
247 'multiple' => true,
248 'endpoint' => get_site_url( null, '/wp-json/disco/v1/search/category/?search=' ),
249 )
250 ),
251 'tags' => self::prepare_filters(
252 'Tags',
253 'select',
254 array(
255 'type' => 'select',
256 'option_type' => 'api',
257 'multiple' => true,
258 'endpoint' => get_site_url( null, '/wp-json/disco/v1/search/tag/?search=' ),
259 )
260 ),
261 'product_brand' => self::prepare_filters(
262 'WooCommerce Brands',
263 'select',
264 array(
265 'type' => 'select',
266 'option_type' => 'api',
267 'multiple' => true,
268 'endpoint' => get_site_url( null, '/wp-json/disco/v1/search/brand/?search=' ),
269 ),
270 'select',
271 ! Disco::is_pro()
272 ),
273 'link' => self::prepare_filters( 'URL' ),
274 'availability' => self::prepare_filters( 'Availability' ),
275 'quantity' => self::prepare_filters( 'Stock Quantity', 'number', 'number' ),
276 'stock_status' => self::prepare_filters(
277 'Stock Status',
278 'select',
279 array(
280 'type' => 'select',
281 'option_type' => 'manual',
282 'multiple' => true,
283 'options' => wc_get_product_stock_status_options(),
284 )
285 ),
286 'weight' => self::prepare_filters( 'Weight', 'number', 'number' ),
287 'weight_unit' => self::prepare_filters(
288 'Weight Unit',
289 'select',
290 array(
291 'type' => 'select',
292 'option_type' => 'manual',
293 'multiple' => true,
294 'options' => array(
295 'kg' => esc_html__( 'kg', 'disco' ),
296 'g' => esc_html__( 'g', 'disco' ),
297 'lb' => esc_html__( 'lb', 'disco' ),
298 'oz' => esc_html__( 'oz', 'disco' ),
299 ),
300 )
301 ),
302 'width' => self::prepare_filters( 'Width', 'number', 'number' ),
303 'height' => self::prepare_filters( 'Height', 'number', 'number' ),
304 'length' => self::prepare_filters( 'Length', 'number', 'number' ),
305 'type' => self::prepare_filters(
306 'Product Type',
307 'select',
308 array(
309 'type' => 'select',
310 'option_type' => 'manual',
311 'multiple' => true,
312 'options' => wc_get_product_types(),
313 )
314 ),
315 'visibility' => self::prepare_filters(
316 'Visibility',
317 'select',
318 array(
319 'type' => 'select',
320 'option_type' => 'manual',
321 'multiple' => true,
322 'options' => wc_get_product_visibility_options(),
323 )
324 ),
325 'rating_total' => self::prepare_filters( 'Total Rating', 'number', 'number' ),
326 'rating_average' => self::prepare_filters( 'Average Rating', 'number', 'number' ),
327 'author_name' => self::prepare_filters(
328 'Author Name',
329 'select',
330 array(
331 'type' => 'select',
332 'option_type' => 'api',
333 'multiple' => true,
334 'endpoint' => get_site_url( null, '/wp-json/disco/v1/search/user_name/?search=' ),
335 )
336 ),
337 'author_email' => self::prepare_filters(
338 'Author Email',
339 'select',
340 array(
341 'type' => 'select',
342 'option_type' => 'api',
343 'multiple' => true,
344 'endpoint' => get_site_url( null, '/wp-json/disco/v1/search/user_email/?search=' ),
345 )
346 ),
347 'date_created' => self::prepare_filters( 'Date Created', 'date', 'date' ),
348 'date_updated' => self::prepare_filters( 'Date Updated', 'date', 'date' ),
349
350 'product_status' => self::prepare_filters(
351 'Status',
352 'select',
353 array(
354 'type' => 'select',
355 'option_type' => 'manual',
356 'multiple' => false,
357 'options' => array(
358 'publish' => esc_html__( 'Publish', 'disco' ),
359 'draft' => esc_html__( 'Draft', 'disco' ),
360 'pending' => esc_html__( 'Pending', 'disco' ),
361 'private' => esc_html__( 'Private', 'disco' ),
362 ),
363 )
364 ),
365 'featured_status' => self::prepare_filters(
366 'Featured Status',
367 'select',
368 array(
369 'type' => 'select',
370 'option_type' => 'manual',
371 'multiple' => false,
372 'options' => array(
373 'yes' => esc_html__( 'Yes', 'disco' ),
374 'no' => esc_html__( 'No', 'disco' ),
375 ),
376 )
377 ),
378 ),
379 );
380 $filter_attributes[] = $primary_attributes;
381
382 $price_attributes = array(
383 'optionGroup' => esc_html__( 'Price', 'disco' ),
384 'options' => array(
385 'currency' => self::prepare_filters( 'Currency' ),
386 'regular_price' => self::prepare_filters( 'Regular Price', 'number', 'number' ),
387 'price' => self::prepare_filters( 'Price', 'number', 'number' ),
388 'sale_price' => self::prepare_filters( 'Sale Price', 'number', 'number' ),
389 'regular_price_with_tax' => self::prepare_filters( 'Regular Price With Tax', 'number', 'number' ),
390 'price_with_tax' => self::prepare_filters( 'Price With Tax', 'number', 'number' ),
391 'sale_price_with_tax' => self::prepare_filters( 'Sale Price With Tax', 'number', 'number' ),
392 'sale_price_sdate' => self::prepare_filters( 'Sale Start Date', 'date', 'date' ),
393 'sale_price_edate' => self::prepare_filters( 'Sale End Date', 'date', 'date' ),
394 ),
395 );
396
397 $filter_attributes[] = $price_attributes;
398
399 // Product Global Attributes
400 $filter_attributes[] = AttributeDropDown::get_global_attributes();
401
402 // Product ACF Attributes
403 $filter_attributes[] = AttributeDropDown::get_acf_attributes();
404
405 // Tax and Shipping Attributes
406 $tax_shipping = array(
407 'optionGroup' => esc_html__( 'Tax and Shipping', 'disco' ),
408 'options' => array(
409 'tax_class' => self::prepare_filters( 'Tax Class' ),
410 'tax_status' => self::prepare_filters( 'Tax Status' ),
411 'shipping_class' => self::prepare_filters( 'Shipping Class' ),
412 ),
413 );
414 $filter_attributes[] = $tax_shipping;
415
416 /**
417 * Subscription Attributes
418 * Add subscription attributes if WooCommerce Subscription plugin installed.
419 *
420 * @link https://woocommerce.com/products/woocommerce-subscriptions/
421 */
422 if ( class_exists( 'WC_Subscriptions' ) ) {
423 $subscription_attributes = array(
424 'optionGroup' => esc_html__( 'Subscription & Installment', 'disco' ),
425 'options' => array(
426 'subscription_period' => self::prepare_filters( 'Subscription Period' ),
427 'subscription_period_interval' => self::prepare_filters( 'Subscription Period Length' ),
428 'subscription_amount' => self::prepare_filters( 'Subscription Amount', 'number', 'number' ),
429 'installment_months' => self::prepare_filters( 'Installment Months', 'number', 'number' ),
430 'installment_amount' => self::prepare_filters( 'Installment Amount', 'number', 'number' ),
431 ),
432 );
433 // TODO: Move to premium version
434 // $filter_attributes[] = $subscription_attributes;
435 }
436
437 /**
438 * Unit Price (WooCommerce Germanized)
439 * Get Germanized for WooCommerce plugins unit attributes.
440 *
441 * @link https://wordpress.org/plugins/woocommerce-germanized/
442 */
443 if ( class_exists( 'WooCommerce_Germanized' ) ) {
444 $wc_unit_price_attributes = array(
445 'optionGroup' => esc_html__( 'Unit Price (WooCommerce Germanized)', 'disco' ),
446 'options' => array(
447 'wc_germanized_unit_price_measure' => self::prepare_filters( 'Unit Price Measure' ),
448 'wc_germanized_unit_price_base_measure' => self::prepare_filters( 'Unit Price Base Measure' ),
449 'wc_germanized_gtin' => self::prepare_filters( 'GTIN' ),
450 'wc_germanized_mpn' => self::prepare_filters( 'MPN' ),
451 ),
452 );
453
454 // TODO: Move to premium version
455 // $filter_attributes[] = $wc_unit_price_attributes;
456 }
457
458 // Cart Attributes
459 $cart_attributes = array(
460 'optionGroup' => esc_html__( 'Cart', 'disco' ),
461 'options' => array(
462 'cart_items_count' => self::prepare_filters( 'Items Count (Entire Cart)', 'number', 'number' ),
463 'cart_items_quantity' => self::prepare_filters( 'Items Quantity (Entire Cart)', 'number', 'number' ),
464 'item_quantity' => self::prepare_filters( 'Item Quantity', 'number', 'number', 'number', ! Disco::is_pro() ),
465 'item_count' => self::prepare_filters( 'Item Count', 'number', 'number', 'number', ! Disco::is_pro() ),
466 'cart_total_weight' => self::prepare_filters( 'Cart Items Total Weight', 'number', 'number' ),
467 'cart_subtotal' => self::prepare_filters( 'Cart Subtotal', 'number', 'number' ),
468 'cart_payment_method' => self::prepare_filters(
469 'Payment Method',
470 'select',
471 array(
472 'type' => 'select',
473 'option_type' => 'manual',
474 'multiple' => true,
475 'options' => StoreDropDown::payment_methods(),
476 )
477 ),
478 'cart_coupons' => self::prepare_filters(
479 'Cart Coupons',
480 'select',
481 array(
482 'type' => 'select',
483 'option_type' => 'api',
484 'multiple' => true,
485 'endpoint' => get_site_url( null, '/wp-json/disco/v1/search/coupon/?search=' ),
486 )
487 ),
488 'products_in_cart' => self::prepare_filters(
489 'Products in Cart',
490 'select',
491 array(
492 'type' => 'select',
493 'option_type' => 'api',
494 'multiple' => true,
495 'endpoint' => get_site_url( null, '/wp-json/disco/v1/search/product/?search=' ),
496 ),
497 'select',
498 ! Disco::is_pro()
499 ),
500 ),
501 );
502
503 $filter_attributes[] = $cart_attributes;
504
505 $purchase_history_attributes = array(
506 'optionGroup' => esc_html__( 'Product Purchase History', 'disco' ),
507 'options' => array(
508 'product_history_last_order_date' => self::prepare_filters( 'Last Order Date', 'date', 'date' ),
509 'product_history_total_order_made' => self::prepare_filters( 'Number of Order Made with a Product', 'number', 'number' ),
510 'product_history_total_amount_sold' => self::prepare_filters( 'Number of Amount Sold with a Product', 'number', 'number' ),
511 'product_history_total_quantity_sold' => self::prepare_filters( 'Number of Quantities Sold with a Product', 'number', 'number' ),
512 // 'product_history_total_order_made_by_ids' => self::prepare_filters(
513 // 'Number of Order Made with Following Products',
514 // 'select',
515 // array(
516 // 'type' => 'select',
517 // 'option_type' => 'api',
518 // 'multiple' => true,
519 // 'endpoint' => get_site_url( null, '/wp-json/disco/v1/search/product/?search=' ),
520 // )
521 // ),
522 // 'product_history_total_amount_sold_by_ids' => self::prepare_filters(
523 // 'Number of Amount Sold with Following Products',
524 // 'select',
525 // array(
526 // 'type' => 'select',
527 // 'option_type' => 'api',
528 // 'multiple' => true,
529 // 'endpoint' => get_site_url( null, '/wp-json/disco/v1/search/product/?search=' ),
530 // )
531 // ),
532 // 'product_history_total_quantity_sold_by_ids' => self::prepare_filters(
533 // 'Number of Quantities Sold with Following Products',
534 // 'select',
535 // array(
536 // 'type' => 'select',
537 // 'option_type' => 'api',
538 // 'multiple' => true,
539 // 'endpoint' => get_site_url( null, '/wp-json/disco/v1/search/product/?search=' ),
540 // )
541 // ),
542 ),
543 'disabled' => !Disco::is_pro(), // Disable if not pro.
544 );
545
546 // TODO: Move to premium version
547 $filter_attributes[] = $purchase_history_attributes;
548
549 $customer_attributes = array(
550 'optionGroup' => esc_html__( 'Customer', 'disco' ),
551 'options' => array(
552 // 'customer_email' => self::prepare_filters(
553 // 'Email',
554 // 'select',
555 // array(
556 // 'type' => 'select',
557 // 'option_type' => 'api',
558 // 'multiple' => true,
559 // 'endpoint' => get_site_url( null, '/wp-json/disco/v1/search/customer/?search=' ),
560 // )
561 // ),
562 'customer_name' => self::prepare_filters(
563 'Customer',
564 'select',
565 array(
566 'type' => 'select',
567 'option_type' => 'api',
568 'multiple' => true,
569 'endpoint' => get_site_url( null, '/wp-json/disco/v1/search/customer/?search=' ),
570 )
571 ),
572 'customer_is_logged_in' => self::prepare_filters(
573 'Is Logged In',
574 'select',
575 array(
576 'type' => 'select',
577 'option_type' => 'manual',
578 'multiple' => false,
579 'options' => array(
580 'yes' => esc_html__( 'Yes', 'disco' ),
581 'no' => esc_html__( 'No', 'disco' ),
582 ),
583 )
584 ),
585 'customer_user_role' => self::prepare_filters(
586 'User Role',
587 'select',
588 array(
589 'type' => 'select',
590 'option_type' => 'manual',
591 'multiple' => true,
592 'options' => StoreDropDown::user_roles(),
593 )
594 ),
595 'customer_country' => self::prepare_filters(
596 'Country',
597 'select',
598 array(
599 'type' => 'select',
600 'option_type' => 'api',
601 'multiple' => true,
602 'endpoint' => get_site_url( null, '/wp-json/disco/v1/search/country/?search=' ),
603 )
604 ),
605 'customer_state' => self::prepare_filters(
606 'State',
607 'select',
608 array(
609 'type' => 'select',
610 'option_type' => 'api',
611 'multiple' => true,
612 'endpoint' => get_site_url( null, '/wp-json/disco/v1/search/state/?search=' ),
613 )
614 ),
615 'customer_zip' => self::prepare_filters( 'Zip' ),
616 ),
617 );
618
619 $filter_attributes[] = $customer_attributes;
620
621 $customer_order_history_attributes = array(
622 'optionGroup' => esc_html__( 'Customer Purchase History', 'disco' ),
623 'options' => array(
624 'customer_history_is_first_order' => self::prepare_filters(
625 'Is First Order',
626 'select',
627 array(
628 'type' => 'select',
629 'option_type' => 'manual',
630 'multiple' => false,
631 'options' => array(
632 'yes' => esc_html__( 'Yes', 'disco' ),
633 'no' => esc_html__( 'No', 'disco' ),
634 ),
635 )
636 ),
637 'customer_history_last_order_date' => self::prepare_filters( 'Last Order Date', 'date', 'date' ),
638 'customer_history_last_order_amount' => self::prepare_filters( 'Last Order Amount', 'number', 'number' ),
639 'customer_history_total_order_made' => self::prepare_filters( 'Number of Order Made By Customer', 'number', 'number' ),
640 'customer_history_total_amount_sold' => self::prepare_filters( 'Total Amount Spent By Customer', 'number', 'number' ),
641 'customer_history_total_quantity_sold' => self::prepare_filters( 'Total Quantities Bought By Customer', 'number', 'number' ),
642 // 'customer_history_total_order_made_by_ids' => self::prepare_filters(
643 // 'Number of Order Made with Following Products',
644 // 'select',
645 // array(
646 // 'type' => 'select',
647 // 'option_type' => 'api',
648 // 'multiple' => true,
649 // 'endpoint' => get_site_url( null, '/wp-json/disco/v1/search/product/?search=' ),
650 // )
651 // ),
652 // 'customer_history_total_amount_sold_by_ids' => self::prepare_filters(
653 // 'Number of Amount Sold with Following Products',
654 // 'select',
655 // array(
656 // 'type' => 'select',
657 // 'option_type' => 'api',
658 // 'multiple' => true,
659 // 'endpoint' => get_site_url( null, '/wp-json/disco/v1/search/product/?search=' ),
660 // )
661 // ),
662 // 'customer_history_total_quantity_sold_by_ids' => self::prepare_filters(
663 // 'Number of Quantities Sold with Following Products',
664 // 'select',
665 // array(
666 // 'type' => 'select',
667 // 'option_type' => 'api',
668 // 'multiple' => true,
669 // 'endpoint' => get_site_url( null, '/wp-json/disco/v1/search/product/?search=' ),
670 // )
671 // ),
672 ),
673 'disabled' => !Disco::is_pro(), // Disable if not pro.
674 );
675 // TODO: Move to premium version
676 $filter_attributes[] = $customer_order_history_attributes;
677
678 // return apply_filters( 'disco_filter_drop_down', $filter_attributes );
679
680 return $filter_attributes;
681 }
682
683 }
684