WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Платформа для конвертации и монетизации трафика
функция не описана

Automattic\WooCommerce\Blocks\Domain\Services

CreateAccount::init() public WC 1.0

Init - register handlers for WooCommerce core email hooks.

{} Это метод класса: CreateAccount{}

Хуков нет.

Возвращает

Null. Ничего.

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

$CreateAccount = new CreateAccount();
$CreateAccount->init();

Код CreateAccount::init() WC 4.7.1

<?php
public function init() {
	if ( ! self::is_feature_enabled() ) {
		return;
	}

	// Override core email handlers to add our new improved "new account" email.
	add_action(
		'woocommerce_email',
		function ( $wc_emails_instance ) {
			// Remove core "new account" handler; we are going to replace it.
			remove_action( 'woocommerce_created_customer_notification', array( $wc_emails_instance, 'customer_new_account' ), 10, 3 );

			// Add custom "new account" handler.
			add_action(
				'woocommerce_created_customer_notification',
				function( $customer_id, $new_customer_data = array(), $password_generated = false ) use ( $wc_emails_instance ) {
					// If this is a block-based signup, send a new email
					// with password reset link (no password in email).
					if ( isset( $new_customer_data['is_checkout_block_customer_signup'] ) ) {
						$this->customer_new_account( $customer_id, $new_customer_data );
						return;
					}

					// Otherwise, trigger the existing legacy email (with new password inline).
					$wc_emails_instance->customer_new_account( $customer_id, $new_customer_data, $password_generated );
				},
				10,
				3
			);
		}
	);
}