Automattic\WooCommerce\Internal\CustomerEmailVerification\Admin

UserProfileField::render │ public │ WC 1.0

Render the "Email address verified" checkbox.

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

Хуков нет.

Возвращает

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

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

$UserProfileField = new UserProfileField();
$UserProfileField->render( $user ): void;
$user(WP_User|разное) (обязательный)
The user being edited.

Код UserProfileField::render() WC 11.2.2

<?php
public function render( $user ): void {
	if ( ! $user instanceof WP_User || ! current_user_can( 'manage_woocommerce' ) ) {
		return;
	}

	wp_nonce_field( self::NONCE_ACTION . '_' . $user->ID, self::NONCE_ACTION . '_nonce' );
	?>
	<h2><?php esc_html_e( 'Email confirmation', 'woocommerce' ); ?></h2>
	<table class="form-table" role="presentation">
		<tr>
			<th scope="row"><?php esc_html_e( 'Email address confirmed', 'woocommerce' ); ?></th>
			<td>
				<label for="<?php echo esc_attr( self::FIELD ); ?>">
					<input type="checkbox" name="<?php echo esc_attr( self::FIELD ); ?>" id="<?php echo esc_attr( self::FIELD ); ?>" value="1" <?php checked( $this->service->is_verified( $user->ID ) ); ?> />
					<?php esc_html_e( 'The customer has confirmed they own this email address.', 'woocommerce' ); ?>
				</label>
				<p class="description"><?php esc_html_e( 'Confirming the email address also links any past guest orders placed with it to this account.', 'woocommerce' ); ?></p>
			</td>
		</tr>
	</table>
	<?php
}