User account page does not update.
-
Hi,
I have created a multiple option meta-key called ‘course’ in registration page which users can select among pre-defined options. I’ve also added following code in the function.php of my child them to add another extra option in users account page.
/* add new tab called "mytab" */ add_filter('um_account_page_default_tabs_hook', 'my_custom_tab_in_um', 100 ); function my_custom_tab_in_um( $tabs ) { $tabs[800]['mytab']['icon'] = 'um-faicon-pencil'; $tabs[800]['mytab']['title'] = 'Registered Courses'; $tabs[800]['mytab']['custom'] = true; return $tabs; } /* make our new tab hookable */ add_action('um_account_tab__mytab', 'um_account_tab__mytab'); function um_account_tab__mytab( $info ) { global $ultimatemember; extract( $info ); $output = $ultimatemember->account->get_tab_output('mytab'); if ( $output ) { echo $output; } } /* Finally we add some content in the tab */ add_filter('um_account_content_hook_mytab', 'um_account_content_hook_mytab'); function um_account_content_hook_mytab( $output ){ ob_start(); ?> <div class="um-field"> <!-- Here goes your custom content --> <?php global $ultimatemember; $id = um_user('ID'); $output2 = ''; $names = [ 'course' ]; $fields = []; foreach( $names as $name ) $fields[ $name ] = UM()->builtin()->get_specific_field( $name ); $fields = apply_filters( 'um_account_secure_fields', $fields, $id ); foreach( $fields as $key => $data ) $output2 .= UM()->fields()->edit_field( $key, $data ); echo $output2; ?> </div> <?php $output .= ob_get_contents(); ob_end_clean(); return $output; }
Users could simply go to their account page and edit the meta-key and add or remove option from the meta-key in case they did it wrong.
However, after upgrading to UM version 2, my users are no longer able to modify this meta-key. They can’t add or remove options. In fact, after they press “Update Registered Course”, a green warning pops-up showing it has been updated but in fact it didn’t.I am trying to resolve this issue for a while but I couldn’t figure out what is the issue. I really need your help and I’ll be so grateful for your help in advance. In case you need to try, I’ve provided the link for both registration and also account page in my website.
Registration page: https://rafiee.net/register/
Account page: https://rafiee.net/account/ <Please press on Edit Profile in case you are in profile page>
Thanks.The page I need help with: [log in to see the link]
- The topic ‘User account page does not update.’ is closed to new replies.