WordPress at Your Fingertips
function is not described

WC_Gateway_Paypal_IPN_Handler::validate_receiver_email() protected WC 1.0

Check receiver email from PayPal. If the receiver email in the IPN is different than what is stored in. WooCommerce -> Settings -> Checkout -> PayPal, it will log an error about it.

{} It's a method of the class: WC_Gateway_Paypal_IPN_Handler{}

No Hooks.


null. Nothing.


// protected - for code of main (parent) or child class
$result = $this->validate_receiver_email( $order, $receiver_email );
$order(WC_Order) (required)
Order object.
$receiver_email(string) (required)
Email to validate.

Code of WC_Gateway_Paypal_IPN_Handler::validate_receiver_email() WC 5.7.0

protected function validate_receiver_email( $order, $receiver_email ) {
	if ( strcasecmp( trim( $receiver_email ), trim( $this->receiver_email ) ) !== 0 ) {
		WC_Gateway_Paypal::log( "IPN Response is for another account: {$receiver_email}. Your email is {$this->receiver_email}" );

		/* translators: %s: email address . */
		$order->update_status( 'on-hold', sprintf( __( 'Validation error: PayPal IPN response from a different email address (%s).', 'woocommerce' ), $receiver_email ) );