Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter bmcalhoun

    (@bmcalhoun)

    After a lot more research I realized that I needed one more step.

    I needed to tell it add a different query string when that custom tab is updated, and then use that query string to then run the custom success message.

    For any others, here is my working code. Obviously it will need to be adjusted for your use:

    add_action( 'um_after_user_account_updated', 'moran_user_account_update', 99, 2 );
    function moran_user_account_update( $user_id, $changes ) {
    	
    	if ( get_query_var('um_tab') == 'invoice' ) {
    		exit( wp_redirect( add_query_arg('updated','invoice') ) );
    	}
    	
    }
    
    add_filter( 'um_custom_success_message_handler', 'moran_custom_success_message', 10, 2 );
    function moran_custom_success_message( $success, $updated ) {
    	if ( $updated == 'invoice' ) {
    		$success = __('Thank you for submiting your invoice.','moran');
    	}
    	return $success;
    }
    • This reply was modified 5 years, 11 months ago by bmcalhoun.
Viewing 1 replies (of 1 total)