WC_Gateway_Paypal_IPN_Handler::send_ipn_email_notification()protectedWC 1.0

Send a notification to the user handling orders.

Метод класса: WC_Gateway_Paypal_IPN_Handler{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->send_ipn_email_notification( $subject, $message );
$subject(строка) (обязательный)
Email subject.
$message(строка) (обязательный)
Email message.

Код WC_Gateway_Paypal_IPN_Handler::send_ipn_email_notification() 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 );
}