PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.17.0
GiveWP – Donation Plugin and Fundraising Platform v4.17.0
4.17.0 4.16.9 4.16.8.1 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 All 256 releases
← All changes | includes/admin/payments/view-payment-details.php +17 -15 4.16.3 → 4.17.0 View file →
@@ -51,9 +51,9 @@
51 51
52 52 $number = $payment->number;
53 53 $payment_meta = $payment->get_meta();
54 54
55 -$company_name = ! empty( $payment_meta['_give_donation_company'] ) ? esc_attr( $payment_meta['_give_donation_company'] ) : '';
55 +$company_name = ! empty( $payment_meta['_give_donation_company'] ) ? esc_html( $payment_meta['_give_donation_company'] ) : '';
56 56 $transaction_id = esc_attr( $payment->transaction_id );
57 57 $user_id = $payment->user_id;
58 58 $donor_id = $payment->customer_id;
59 59 $payment_date = strtotime( $payment->date );
@@ -63,10 +63,12 @@
63 63 $gateway = $payment->gateway;
64 64 $currency_code = $payment->currency;
65 65 $payment_mode = $payment->mode;
66 66 $base_url = admin_url( 'edit.php?post_type=give_forms&page=give-payment-history' );
67 -$donation_phone_number = Donation::find($payment_id)->phone;
68 -$donor_phone_number = Donor::find($donor_id)->phone;
67 +$donation_model = Donation::find( $payment_id );
68 +$donor_model = Donor::find( $donor_id );
69 +$donation_phone_number = $donation_model ? $donation_model->phone : '';
70 +$donor_phone_number = $donor_model ? $donor_model->phone : '';
69 71
70 72 ?>
71 73 <div class="wrap give-wrap">
72 74
@@ -646,17 +648,17 @@
646 648 </p>
647 649 <p>
648 650 <strong><?php esc_html_e( 'Donor Email:', 'give' ); ?></strong><br>
649 651 <?php
650 - // Show Donor donation email first and Primary email on parenthesis if not match both email.
651 - echo ( empty( $donor->email ) || hash_equals( $donor->email, $payment->email ) )
652 - ? $payment->email
653 - : sprintf(
654 - '%1$s (<a href="%2$s" target="_blank">%3$s</a>)',
655 - $payment->email,
656 - esc_url( admin_url( "edit.php?post_type=give_forms&page=give-donors&view=overview&id={$donor_id}" ) ),
657 - $donor->email
658 - );
652 + // Show Donor donation email first and Primary email on parenthesis if not match both email.
653 + echo ( empty( $donor->email ) || hash_equals( $donor->email, $payment->email ) )
654 + ? esc_html( $payment->email )
655 + : sprintf(
656 + '%1$s (<a href="%2$s" target="_blank">%3$s</a>)',
657 + esc_html( $payment->email ),
658 + esc_url( admin_url( "edit.php?post_type=give_forms&page=give-donors&view=overview&id={$donor_id}" ) ),
659 + esc_html( $donor->email )
660 + );
659 661 ?>
660 662 </p>
661 663 <p>
662 664 <?php
@@ -667,14 +669,14 @@
667 669 <?php
668 670 // Show Donor donation phone first and Primary phone on parenthesis if not match both phone.
669 671 echo (empty($donor_phone_number) ||
670 672 hash_equals($donor_phone_number, $donation_phone_number))
671 - ? $donation_phone_number :
673 + ? esc_html($donation_phone_number) :
672 674 sprintf(
673 675 '%1$s (<a href="%2$s" target="_blank">%3$s</a>)',
674 - $donation_phone_number,
676 + esc_html($donation_phone_number),
675 677 esc_url(admin_url("edit.php?post_type=give_forms&page=give-donors&view=overview&id={$donor_id}")),
676 - $donor_phone_number
678 + esc_html($donor_phone_number)
677 679 );
678 680 }
679 681 ?>
680 682 </p>