WC_Email_New_Order::mobile_messaging()publicWC 1.0

Add mobile messaging.

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

Хуков нет.

Возвращает

null. Ничего.

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

$WC_Email_New_Order = new WC_Email_New_Order();
$WC_Email_New_Order->mobile_messaging( $email );
$email(WC_Email) (обязательный)
that called for mobile messaging. May not contain a WC_Email for legacy reasons.

Код WC_Email_New_Order::mobile_messaging() WC 7.1.1

public function mobile_messaging( $email ) {
	if ( $email instanceof WC_Email_New_Order && null !== $this->object ) {
		$domain = wp_parse_url( home_url(), PHP_URL_HOST );
		wc_get_template(
			'emails/email-mobile-messaging.php',
			array(
				'order'   => $this->object,
				'blog_id' => class_exists( 'Jetpack_Options' ) ? Jetpack_Options::get_option( 'id' ) : null,
				'now'     => new DateTime(),
				'domain'  => is_string( $domain ) ? $domain : '',
			)
		);
	}
}