| @@ -29,14 +29,16 @@ | ||
| 29 | 29 | wp_remote_post( |
| 30 | 30 | 'https://api.kit.com/v4/oauth/revoke', |
| 31 | 31 | array( |
| 32 | 32 | 'headers' => array( |
| 33 | - 'Content-Type' => 'application/x-www-form-urlencoded', | |
| 33 | + 'Accept' => 'application/json', | |
| 34 | + 'Content-Type' => 'application/json', | |
| 34 | 35 | ), |
| 35 | - 'body' => array( | |
| 36 | - 'client_id' => 'HXZlOCj-K5r0ufuWCtyoyo3f688VmMAYSsKg1eGvw0Y', | |
| 37 | - 'token' => $settings['access_token'], | |
| 38 | - 'token_type_hint' => 'access_token', | |
| 36 | + 'body' => wp_json_encode( | |
| 37 | + array( | |
| 38 | + 'client_id' => 'HXZlOCj-K5r0ufuWCtyoyo3f688VmMAYSsKg1eGvw0Y', | |
| 39 | + 'token' => $settings['access_token'], | |
| 40 | + ) | |
| 39 | 41 | ), |
| 40 | 42 | 'timeout' => 5, |
| 41 | 43 | ) |
| 42 | 44 | ); |
| @@ -47,14 +49,16 @@ | ||
| 47 | 49 | wp_remote_post( |
| 48 | 50 | 'https://api.kit.com/v4/oauth/revoke', |
| 49 | 51 | array( |
| 50 | 52 | 'headers' => array( |
| 51 | - 'Content-Type' => 'application/x-www-form-urlencoded', | |
| 53 | + 'Accept' => 'application/json', | |
| 54 | + 'Content-Type' => 'application/json', | |
| 52 | 55 | ), |
| 53 | - 'body' => array( | |
| 54 | - 'client_id' => 'HXZlOCj-K5r0ufuWCtyoyo3f688VmMAYSsKg1eGvw0Y', | |
| 55 | - 'token' => $settings['refresh_token'], | |
| 56 | - 'token_type_hint' => 'refresh_token', | |
| 56 | + 'body' => wp_json_encode( | |
| 57 | + array( | |
| 58 | + 'client_id' => 'HXZlOCj-K5r0ufuWCtyoyo3f688VmMAYSsKg1eGvw0Y', | |
| 59 | + 'token' => $settings['refresh_token'], | |
| 60 | + ) | |
| 57 | 61 | ), |
| 58 | 62 | 'timeout' => 5, |
| 59 | 63 | ) |
| 60 | 64 | ); |