← All changes
|
jetpack_vendor/automattic/jetpack-search/src/class-rest-controller.php
+8
-0
16.2
→
16.3-a.7
View file →
| @@ -424,8 +424,16 @@ | ||
| 424 | 424 | } |
| 425 | 425 | return true; |
| 426 | 426 | } |
| 427 | 427 | |
| 428 | + if ( true === $reader_chat && ( ! $this->plan->supports_search() || $this->plan->is_free_plan() ) ) { | |
| 429 | + return new WP_Error( | |
| 430 | + 'rest_forbidden', | |
| 431 | + esc_html__( 'Site Chat requires a paid Jetpack Search plan.', 'jetpack-search-pkg' ), | |
| 432 | + array( 'status' => 403 ) | |
| 433 | + ); | |
| 434 | + } | |
| 435 | + | |
| 428 | 436 | // AI Answers requires a paid Search plan; reject the write outright. |
| 429 | 437 | if ( true === $ai_answers_enabled && ! Search_Blocks::supports_paid_search() ) { |
| 430 | 438 | return new WP_Error( |
| 431 | 439 | 'rest_forbidden', |