|
@@ 505-520 (lines=16) @@
|
| 502 |
|
* @global wpdb $wpdb |
| 503 |
|
* @return string |
| 504 |
|
*/ |
| 505 |
|
private function get_where_donation_count() { |
| 506 |
|
$where = ''; |
| 507 |
|
|
| 508 |
|
if ( ! empty( $this->args['donation_count'] ) ) { |
| 509 |
|
$compare = '>'; |
| 510 |
|
$amount = $this->args['donation_count']; |
| 511 |
|
if ( is_array( $this->args['donation_count'] ) ) { |
| 512 |
|
$compare = $this->args['donation_count'] ['compare']; |
| 513 |
|
$amount = $this->args['donation_count']['amount']; |
| 514 |
|
} |
| 515 |
|
|
| 516 |
|
$where .= "AND {$this->table_name}.purchase_count{$compare}{$amount}"; |
| 517 |
|
} |
| 518 |
|
|
| 519 |
|
return $where; |
| 520 |
|
} |
| 521 |
|
|
| 522 |
|
/** |
| 523 |
|
* Set purchase value where clause. |
|
@@ 532-547 (lines=16) @@
|
| 529 |
|
* @global wpdb $wpdb |
| 530 |
|
* @return string |
| 531 |
|
*/ |
| 532 |
|
private function get_where_donation_amount() { |
| 533 |
|
$where = ''; |
| 534 |
|
|
| 535 |
|
if ( ! empty( $this->args['donation_amount'] ) ) { |
| 536 |
|
$compare = '>'; |
| 537 |
|
$amount = $this->args['donation_amount']; |
| 538 |
|
if ( is_array( $this->args['donation_amount'] ) ) { |
| 539 |
|
$compare = $this->args['donation_amount'] ['compare']; |
| 540 |
|
$amount = $this->args['donation_amount']['amount']; |
| 541 |
|
} |
| 542 |
|
|
| 543 |
|
$where .= "AND {$this->table_name}.purchase_value{$compare}{$amount}"; |
| 544 |
|
} |
| 545 |
|
|
| 546 |
|
return $where; |
| 547 |
|
} |
| 548 |
|
|
| 549 |
|
/** |
| 550 |
|
* Set give_forms where clause. |