I’m trying to make my own appointment system for WordPress. For this, I created a post type called "appointments". When users select a service from the service list, the available dates and times are listed. When the available date and time are selected and the appointment is created, a meta key named "appointment_datetime" is added […]
- Tags 'compare' => '=', 'fields' => 'ids', 'meta_query' => array( 'relation' => 'AND', 'tax_query' => array( array( 'taxonomy' => 'services', 'terms' => $service_id, 'value' => $date_time, ) ) )); if ( !empty($already_reserved->posts) ) { $response = 'Sorry, { "field": "id", // timestamps 'type' => 'numeric', a meta key named "appointment_datetime" is added for this appointment. Here is where the problem started. Two different users should not be, array( 'key' => 'datetime', I created a post type called "appointments". When users select a service from the service list, I'm trying to make my own appointment system for WordPress. For this, the available dates and times are listed. When the available date and time are selected and the appointment is created, the following method is used to check whether the date and time he chose are available. $already_reserved = new WP_Query(array( 'post_ty, when a user tries to create an appointment