Support » Plugin: Tawk.To Live Chat » Great, but there is a small problem

  • Secure javascript API Enabled,Does not display the login user name, which may be caused by the relatively simplified code。
    But this is really great。
    emmmm,I found a way。

    edit tawkto.php
    jump line 221 ,Insert a row
    add:
    'hash' => hash_hmac("sha256",$current_user->user_email,"your API Key")

    getCurrentCustomerDetails look like this:

    		public function getCurrentCustomerDetails () {
    			if(is_user_logged_in() ){
    				$current_user = wp_get_current_user();
    				$user_info = array(
    					'name' => $current_user->display_name,
    					'email' => $current_user->user_email,
    					'hash' => hash_hmac("sha256",$current_user->user_email,"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
    				);
    				return json_encode($user_info);
    			}
    			return NULL;
    		}

    This is the solution I found。

    • This topic was modified 1 year, 5 months ago by  Chriser. Reason: Solve the problem
    • This topic was modified 1 year, 5 months ago by  Chriser.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Great, but there is a small problem’ is closed to new replies.