woocommerce_register_post
Fires before a customer account is registered.
This hook fires before customer accounts are created and passes the form data (username, email) and an array of errors.
This could be used to add extra validation logic and append errors to the array.
Использование
add_action( 'woocommerce_register_post', 'wp_kama_woocommerce_register_post_action', 10, 3 ); /** * Function for `woocommerce_register_post` action-hook. * * @param string $username Customer username. * @param string $user_email Customer email address. * @param \WP_Error $errors Error object. * * @return void */ function wp_kama_woocommerce_register_post_action( $username, $user_email, $errors ){ // action... }
- $username(строка)
- Customer username.
- $user_email(строка)
- Customer email address.
- $errors(\WP_Error)
- Error object.
Список изменений
С версии 7.2.0 | Введена. |
Где вызывается хук
woocommerce_register_post
woocommerce/includes/wc-user-functions.php 117
do_action( 'woocommerce_register_post', $username, $email, $errors );