Steps to reproduce
I attempted to remove the email field from the settings page so I could move it to a separate security page using my own form.
add_filter( 'hivepress/v1/forms/user_update', [ $this, 'settings_form' ], 1000 );
public function settings_form( $form ) {
unset( $form[ 'fields' ][ 'email' ] );
return $form;
} // End settings_form()
Actual result
Every time I save the form, no matter what I update, it gives me an error saying that I need to enter my current password. If I refresh, the update was saved regardless, so it didn’t actually need my current password.
Expected result
Allow it to save without having an email field.
Temporary solution
Add to CSS:
.hp-template--user-edit-settings-page .hp-form__field:has(input[name="email"]) {
display: none !important;
}