[ad_1]
Hi!
I’m having trouble with my code.
PHP Fatal error: Cannot redeclare my_user_after_updating_profile() (previously declared in “path”:566 in “path” on line 566″
Context: On the user’s accounts page, there are several checkbox roles they can assign themselves. After submission, my code assigns all roles to the users, then removes ones that were not included in the checkboxes. It achieves this by converting the array into a string and searching the string for that role.
I get this error after submission, however the code successfully runs, but it breaks.
I’m struggling to understand where this is looping back around.
Code is below.
add_action( 'um_user_after_updating_profile', 'my_user_after_updating_profile', 10, 2 );
function my_user_after_updating_profile( $userinfo, $user_id ) {
//my code
}
do_action( 'um_user_after_updating_profile', $to_update, $user_id, $args );
Can someone help?
