PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 3.19.2
GiveWP – Donation Plugin and Fundraising Platform v3.19.2
4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 2.31.0 2.31.1 All 253 releases
← All changes | src/MultiFormGoals/ProgressBar/Query.php +3 -3 4.16.03.19.2 View file →
@@ -8,8 +8,9 @@
8 8 * Get the Total, Count, and Average of the payment totals for published donations of a given set of forms.
9 9 */
10 10 class Query
11 11 {
12 +
12 13 /** @var array */
13 14 protected $formIDs;
14 15
15 16 /**
@@ -27,9 +28,8 @@
27 28 $this->formIDs = $formIDs;
28 29 }
29 30
30 31 /**
31 - * @since 4.14.0 Replace {$wpdb->paymentmeta} with {$wpdb->donationmeta}
32 32 * @since 3.14.0 Consider the donation mode (test or live) instead of querying both modes together
33 33 * @return string
34 34 */
35 35 public function getSQL()
@@ -42,9 +42,9 @@
42 42 count( payment.ID ) as count
43 43 FROM {$wpdb->posts} as payment
44 44 JOIN {$wpdb->give_revenue} as revenue
45 45 ON revenue.donation_id = payment.ID
46 - JOIN {$wpdb->donationmeta} paymentMode
46 + JOIN {$wpdb->paymentmeta} paymentMode
47 47 ON payment.ID = paymentMode.donation_id AND paymentMode.meta_key = '_give_payment_mode'
48 48 WHERE
49 49 payment.post_type = 'give_payment'
50 50 AND
@@ -52,9 +52,9 @@
52 52 AND
53 53 paymentMode.meta_value = '{$mode}'
54 54 ";
55 55
56 - if (!empty($this->formIDs)) {
56 + if ( ! empty($this->formIDs)) {
57 57 $sql .= '
58 58 AND
59 59 revenue.form_id IN ( ' . $this->getFormsString() . ' )
60 60 ';