WC_Gateway_Paypal_IPN_Handler::send_ipn_email_notification()protectedWC 1.0

Send a notification to the user handling orders.

Method of the class: WC_Gateway_Paypal_IPN_Handler{}

No Hooks.

Return

null. Nothing (null).

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.

WC_Gateway_Paypal_IPN_Handler::send_ipn_email_notification() code WC 8.7.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 );
}