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/emails/class-email-access-email.php +3 -8 4.15.1 → 4.17.0 View file →
@@ -256,8 +256,9 @@
256 256 *
257 257 * @param int $donor_id Donor ID.
258 258 * @param string $email Donor Email.
259 259 *
260 + * @since 4.16.1 Return false instead of wp_die when donor is not found.
260 261 * @since 2.0
261 262 * @access public
262 263 *
263 264 * @return bool
@@ -264,16 +265,10 @@
264 265 */
265 266 public function setup_email_notification( $donor_id, $email ) {
266 267 $donor = Give()->donors->get_donor_by( 'email', $email );
267 268
268 - if ( ! $donor->id ) {
269 - wp_die(
270 - esc_html__( 'Cheatin’ uh?', 'give' ),
271 - esc_html__( 'Error', 'give' ),
272 - array(
273 - 'response' => 400,
274 - )
275 - );
269 + if ( ! is_object( $donor ) || ! $donor->id ) {
270 + return false;
276 271 }
277 272
278 273 $this->recipient_email = $email;
279 274