Unable to create user in Discourse from WP with new registration form

Just add an action trigger to your code.

do_action( 'wp_login' );