Skip to content

Commit 10bfbe0

Browse files
committed
Password change account page now saving correctly
1 parent da2c4cc commit 10bfbe0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

includes/wpum-forms/class-wpum-form-password.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,11 @@ public function submit_handler() {
247247
if ( empty( $active_tab ) ) {
248248
$active_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : 'password';
249249
}
250-
251-
$redirect = rtrim( get_permalink(), '/' ) . '/' . 'password';
250+
$redirect = get_permalink();
251+
if ( ! $redirect ) {
252+
$redirect = get_permalink( wpum_get_core_page_id( 'account' ) );
253+
}
254+
$redirect = rtrim( $redirect, '/' ) . '/' . 'password';
252255
$redirect = add_query_arg(
253256
[
254257
'password-updated' => 'success',

0 commit comments

Comments
 (0)