| @@ 687-711 (lines=25) @@ | ||
| 684 | * |
|
| 685 | * @return void |
|
| 686 | */ |
|
| 687 | public function give_forms() { |
|
| 688 | ||
| 689 | if ( empty( $this->args['give_forms'] ) ) { |
|
| 690 | return; |
|
| 691 | } |
|
| 692 | ||
| 693 | $compare = '='; |
|
| 694 | ||
| 695 | if ( is_array( $this->args['give_forms'] ) ) { |
|
| 696 | $compare = 'IN'; |
|
| 697 | } |
|
| 698 | ||
| 699 | $this->__set( |
|
| 700 | 'meta_query', array( |
|
| 701 | array( |
|
| 702 | 'key' => '_give_payment_form_id', |
|
| 703 | 'value' => $this->args['give_forms'], |
|
| 704 | 'compare' => $compare, |
|
| 705 | ), |
|
| 706 | ) |
|
| 707 | ); |
|
| 708 | ||
| 709 | $this->__unset( 'give_forms' ); |
|
| 710 | ||
| 711 | } |
|
| 712 | ||
| 713 | /** |
|
| 714 | * Specific Gateway |
|
| @@ 721-745 (lines=25) @@ | ||
| 718 | * |
|
| 719 | * @return void |
|
| 720 | */ |
|
| 721 | public function gateway_filter() { |
|
| 722 | ||
| 723 | if ( empty( $this->args['gateway'] ) ) { |
|
| 724 | return; |
|
| 725 | } |
|
| 726 | ||
| 727 | $compare = '='; |
|
| 728 | ||
| 729 | if ( is_array( $this->args['gateway'] ) ) { |
|
| 730 | $compare = 'IN'; |
|
| 731 | } |
|
| 732 | ||
| 733 | $this->__set( |
|
| 734 | 'meta_query', array( |
|
| 735 | array( |
|
| 736 | 'key' => '_give_payment_gateway', |
|
| 737 | 'value' => $this->args['gateway'], |
|
| 738 | 'compare' => $compare, |
|
| 739 | ), |
|
| 740 | ) |
|
| 741 | ); |
|
| 742 | ||
| 743 | $this->__unset( 'gateway' ); |
|
| 744 | ||
| 745 | } |
|
| 746 | ||
| 747 | ||
| 748 | /** |
|