| @@ 735-758 (lines=24) @@ | ||
| 732 | * |
|
| 733 | * @return void |
|
| 734 | */ |
|
| 735 | public function give_forms() { |
|
| 736 | ||
| 737 | if ( empty( $this->args['give_forms'] ) ) { |
|
| 738 | return; |
|
| 739 | } |
|
| 740 | ||
| 741 | $compare = '='; |
|
| 742 | ||
| 743 | if ( is_array( $this->args['give_forms'] ) ) { |
|
| 744 | $compare = 'IN'; |
|
| 745 | } |
|
| 746 | ||
| 747 | $this->__set( |
|
| 748 | 'meta_query', |
|
| 749 | array( |
|
| 750 | 'key' => '_give_payment_form_id', |
|
| 751 | 'value' => $this->args['give_forms'], |
|
| 752 | 'compare' => $compare, |
|
| 753 | ) |
|
| 754 | ); |
|
| 755 | ||
| 756 | $this->__unset( 'give_forms' ); |
|
| 757 | ||
| 758 | } |
|
| 759 | ||
| 760 | /** |
|
| 761 | * Specific Gateway |
|
| @@ 768-792 (lines=25) @@ | ||
| 765 | * |
|
| 766 | * @return void |
|
| 767 | */ |
|
| 768 | public function gateway_filter() { |
|
| 769 | ||
| 770 | if ( empty( $this->args['gateway'] ) ) { |
|
| 771 | return; |
|
| 772 | } |
|
| 773 | ||
| 774 | $compare = '='; |
|
| 775 | ||
| 776 | if ( is_array( $this->args['gateway'] ) ) { |
|
| 777 | $compare = 'IN'; |
|
| 778 | } |
|
| 779 | ||
| 780 | $this->__set( |
|
| 781 | 'meta_query', array( |
|
| 782 | array( |
|
| 783 | 'key' => '_give_payment_gateway', |
|
| 784 | 'value' => $this->args['gateway'], |
|
| 785 | 'compare' => $compare, |
|
| 786 | ), |
|
| 787 | ) |
|
| 788 | ); |
|
| 789 | ||
| 790 | $this->__unset( 'gateway' ); |
|
| 791 | ||
| 792 | } |
|
| 793 | ||
| 794 | ||
| 795 | /** |
|