| @@ -5,8 +5,10 @@ | ||
| 5 | 5 | * @package Timetics |
| 6 | 6 | */ |
| 7 | 7 | namespace Timetics\Core\Appointments; |
| 8 | 8 | |
| 9 | +defined( 'ABSPATH' ) || exit; | |
| 10 | + | |
| 9 | 11 | use Timetics\Base\Api; |
| 10 | 12 | use Timetics\Utils\Singleton; |
| 11 | 13 | use WP_Error; |
| 12 | 14 | |
| @@ -315,9 +317,10 @@ | ||
| 315 | 317 | |
| 316 | 318 | $response = [ |
| 317 | 319 | 'success' => 1, |
| 318 | 320 | 'status_code' => 200, |
| 319 | - 'message' => sprintf( __( 'Successfully deleted %d out of %d categories', 'timetics' ), $counter, count( $ids ) ), | |
| 321 | + /* translators: 1: Number of deleted categories, 2: Total number of categories */ | |
| 322 | + 'message' => sprintf( __( 'Successfully deleted %1$d out of %2$d categories', 'timetics' ), $counter, count( $ids ) ), | |
| 320 | 323 | ]; |
| 321 | 324 | |
| 322 | 325 | return rest_ensure_response( $response ); |
| 323 | 326 | } |
| @@ -359,8 +362,9 @@ | ||
| 359 | 362 | private function get_post_ids( $term_id ) { |
| 360 | 363 | $args = [ |
| 361 | 364 | 'post_type' => 'timetics-appointment', |
| 362 | 365 | 'fields' => 'ids', |
| 366 | + // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_tax_query -- Tax query is necessary for filtering appointments by category | |
| 363 | 367 | 'tax_query' => [ |
| 364 | 368 | [ |
| 365 | 369 | 'taxonomy' => 'timetics-meeting-category', |
| 366 | 370 | 'terms' => $term_id, |
| @@ -383,8 +387,9 @@ | ||
| 383 | 387 | 'description' => $appointment->get_description(), |
| 384 | 388 | 'type' => $appointment->get_type(), |
| 385 | 389 | 'locations' => $appointment->get_locations(), |
| 386 | 390 | 'price' => $appointment->get_price(), |
| 391 | + 'visibility' => $appointment->get_visibility(), | |
| 387 | 392 | ]; |
| 388 | 393 | |
| 389 | 394 | return $data; |
| 390 | 395 | } |