I have a function to send user data to a google sheet whenever the user’s profile gets updated:
add_action('profile_update','send_user_data_to_google_sheet')
function send_user_data_to_google_sheet(){
...
}
It works well except that I can feel that it apparently takes longer when users update their profiles because it has to wait for the data to be sent.
Is there a way to execute the hook asynchronously so it won’t affect user’s experience?