public static function update_api_website_values($api_key, $modify_token, $email_address) { $home_url = home_url(); $trimmed_domain = DispletRetsIdxUtilities::remove_url_suffixes(DispletRetsIdxUtilities::remove_url_prefixes($home_url)); $query_url = self::$_api_url . '/api_apps/' . $api_key; $query_args = array('method' => 'PUT', 'timeout' => 10, 'headers' => array('referer' => $home_url), 'body' => array('email' => $email_address, 'domain' => $trimmed_domain, 'authentication_token' => $api_key, 'modify_token' => $modify_token)); $json_array = wp_remote_post($query_url, $query_args); if (is_array($json_array) && !empty($json_array['body'])) { $json_response = json_decode($json_array['body']); if (!empty($json_response->success)) { return $home_url; } } return false; }