PluginProbe
Timetics – Appointment Booking Calendar & Scheduling / 1.0.64
Timetics – Appointment Booking Calendar & Scheduling v1.0.64
1.0.64 1.0.62 1.0.63 1.0.61 1.0.60 1.0.59 1.0.58 1.0.57 1.0.56 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.20 1.0.21 All 65 releases
← All changes | core/appointments/api-appointment-taxonomy.php +6 -1 1.0.18 → 1.0.64 View file →
@@ -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 }