WordPress at Your Fingertips
function is not described

WC_Gateway_Paypal_IPN_Handler::send_ipn_email_notification() protected WC 1.0

Send a notification to the user handling orders.

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

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->send_ipn_email_notification( $subject, $message );
$subject(string) (required)
Email subject.
$message(string) (required)
Email message.

Code of WC_Gateway_Paypal_IPN_Handler::send_ipn_email_notification() WC 5.6.0

protected function send_ipn_email_notification( $subject, $message ) {
	$new_order_settings = get_option( 'woocommerce_new_order_settings', array() );
	$mailer             = WC()->mailer();
	$message            = $mailer->wrap_message( $subject, $message );

	$woocommerce_paypal_settings = get_option( 'woocommerce_paypal_settings' );
	if ( ! empty( $woocommerce_paypal_settings['ipn_notification'] ) && 'no' === $woocommerce_paypal_settings['ipn_notification'] ) {
		return;
	}

	$mailer->send( ! empty( $new_order_settings['recipient'] ) ? $new_order_settings['recipient'] : get_option( 'admin_email' ), strip_tags( $subject ), $message );
}