Viewing 2 replies - 1 through 2 (of 2 total)
  • jackal

    (@anasmokayed)

    I’m interested in this option as well!

    Looking through the code I don’t see any filters or hooks to attach to so you have to modify the plugin code directly and then apply those changes again anytime the plugin is updated. That being said, the following will hide the tawk.to widget for logged in users that don’t have the ‘editor’ or ‘administrator’ roles. Insert the code block at line 583 in tawkto-live-chat/tawkto.php

    if (is_user_logged_in() && ! ( current_user_can('editor') || current_user_can('administrator') )) {
    ? ?$display = false;
    }
    
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Disable for logged-in users’ is closed to new replies.