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