On the way to launch Live Clöthing, I had to hack this morning the register action hooks for WordPress, that don’t work as simply as excepted.

‘register_post’ action

You won’t be able to add more errors in $errors if you do not make it global in register_new_user() of wp-login.php:

function register_new_user($user_login, $user_email) {
global $errors;

‘user_register’ action

For some strange reason, $user_id is not available, you’ll need to add this hack to read it in your hook function:

$user_id = (int) func_get_arg( 0 );

About alx

No Comments

Be the first to start a conversation

Leave a Reply

  • (will not be published)