| @@ -435,8 +435,20 @@ | ||
| 435 | 435 | if ( ! empty( $item->bogo_type ) && in_array( 'bogo_type', $fields, true ) ) { |
| 436 | 436 | $data['bogo_type'] = $item->bogo_type; |
| 437 | 437 | } |
| 438 | 438 | |
| 439 | + $data['count_quantity_as'] = 'separate'; | |
| 440 | + | |
| 441 | + if ( in_array( 'count_quantity_as', $fields, true ) && $item instanceof \Disco\App\Utility\Config ) { | |
| 442 | + $data['count_quantity_as'] = $item->get_count_quantity_as(); | |
| 443 | + } | |
| 444 | + | |
| 445 | + $data['free_item_selection'] = 'cart_order'; | |
| 446 | + | |
| 447 | + if ( in_array( 'free_item_selection', $fields, true ) && $item instanceof \Disco\App\Utility\Config ) { | |
| 448 | + $data['free_item_selection'] = $item->get_free_item_selection(); | |
| 449 | + } | |
| 450 | + | |
| 439 | 451 | $data['ui'] = array(); |
| 440 | 452 | |
| 441 | 453 | if ( ! empty( $item->ui ) && in_array( 'ui', $fields, true ) ) { |
| 442 | 454 | $data['ui'] = $item->ui; |
| @@ -560,8 +572,24 @@ | ||
| 560 | 572 | 'arg_options' => array( |
| 561 | 573 | 'sanitize_callback' => 'sanitize_text_field', |
| 562 | 574 | ), |
| 563 | 575 | ), |
| 576 | + 'count_quantity_as' => array( | |
| 577 | + 'description' => __( 'How item quantities aggregate toward the tier: separate, variations, filters.', 'disco' ), | |
| 578 | + 'type' => 'string', | |
| 579 | + 'context' => array( 'view', 'edit' ), | |
| 580 | + 'arg_options' => array( | |
| 581 | + 'sanitize_callback' => 'sanitize_text_field', | |
| 582 | + ), | |
| 583 | + ), | |
| 584 | + 'free_item_selection' => array( | |
| 585 | + 'description' => __( 'BOGO free item selection: cart_order, lowest, highest.', 'disco' ), | |
| 586 | + 'type' => 'string', | |
| 587 | + 'context' => array( 'view', 'edit' ), | |
| 588 | + 'arg_options' => array( | |
| 589 | + 'sanitize_callback' => 'sanitize_text_field', | |
| 590 | + ), | |
| 591 | + ), | |
| 564 | 592 | 'discount_valid_from' => array( |
| 565 | 593 | 'description' => __( 'Discount Start Date.', 'disco' ), |
| 566 | 594 | 'type' => 'date-time', |
| 567 | 595 | 'context' => array( 'view', 'edit' ), |
| @@ -729,8 +757,10 @@ | ||
| 729 | 757 | 'discount_valid_from', |
| 730 | 758 | 'discount_max_user', |
| 731 | 759 | 'discount_based_on', |
| 732 | 760 | 'bogo_type', |
| 761 | + 'count_quantity_as', | |
| 762 | + 'free_item_selection', | |
| 733 | 763 | 'discount_valid_to', |
| 734 | 764 | 'discount_method', |
| 735 | 765 | 'discount_coupon', |
| 736 | 766 | 'design_blocks', |