Automattic\WooCommerce\Internal\CustomerEmailVerification\Admin

UserProfileField::renderpublicWC 1.0

Render the "Email address verified" checkbox.

Method of the class: UserProfileField{}

No Hooks.

Returns

null. Nothing (null).

Usage

$UserProfileField = new UserProfileField();
$UserProfileField->render( $user ): void;
$user(WP_User|mixed) (required)
The user being edited.

UserProfileField::render() code WC 11.0.1

<?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
}