5, 'headers' => array( 'Authorization' => 'Bearer ' . $rayachat_sync['token'], 'Content-Type' => 'application/json', ), 'body' => '{}', )); } // And the inbox's key, so this site can no longer read the chatbot's conversations. $rayachat_inbox = get_option('rayachat_inbox', array()); if (is_array($rayachat_inbox) && !empty($rayachat_inbox['token'])) { wp_remote_post($rayachat_origin . '/api/integrations/wordpress/disconnect', array( 'timeout' => 5, 'headers' => array( 'Authorization' => 'Bearer ' . $rayachat_inbox['token'], 'Content-Type' => 'application/json', ), 'body' => '{}', )); } if (function_exists('as_unschedule_all_actions')) { as_unschedule_all_actions('', array(), 'rayachat'); } delete_option('rayachat_settings'); delete_option('rayachat_sync'); delete_option('rayachat_inbox'); delete_transient('rayachat_summary'); delete_metadata('user', 0, 'rayachat_dashboard_cards', '', true); delete_metadata('user', 0, 'rayachat_inbox_seen', '', true); delete_option('rayachat_daily_checked'); delete_site_transient('rayachat_release');