How to execute a hook asynchronously?

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #29
    MCW
    Participant

    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?

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.