| @@ -19,13 +19,14 @@ | ||
| 19 | 19 | * @param string $action |
| 20 | 20 | * |
| 21 | 21 | * @return array|false |
| 22 | 22 | */ |
| 23 | - public function cache_toggle( $action = 'enable' ) { | |
| 23 | + public function cache_toggle( $action = 'enable', $type = 'fastcgi' ) { | |
| 24 | 24 | return $this->post( |
| 25 | 25 | '/cache-toggle', |
| 26 | 26 | [ |
| 27 | 27 | 'action' => $action, |
| 28 | + 'type' => $type, | |
| 28 | 29 | ] |
| 29 | 30 | ); |
| 30 | 31 | } |
| 31 | 32 | |
| @@ -34,9 +35,9 @@ | ||
| 34 | 35 | * |
| 35 | 36 | * @return string |
| 36 | 37 | */ |
| 37 | 38 | protected function get_endpoint() { |
| 38 | - return apply_filters( 'flywp_api_endpoint', 'https://app.flywp.io/api/site-api' ); | |
| 39 | + return apply_filters( 'flywp_api_endpoint', 'https://app.flywp.com/api/site-api' ); | |
| 39 | 40 | } |
| 40 | 41 | |
| 41 | 42 | /** |
| 42 | 43 | * Send a GET request to the API. |
| @@ -89,9 +90,8 @@ | ||
| 89 | 90 | ] |
| 90 | 91 | ); |
| 91 | 92 | |
| 92 | 93 | if ( is_wp_error( $response ) ) { |
| 93 | - // Handle error if needed | |
| 94 | 94 | return false; |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | $body = wp_remote_retrieve_body( $response ); |