WPML

문제 개요

인원수가 지정된 예약에서 예약 인원이 1명보다 많은 경우, 예약 가능 여부가 올바르게 조정되지 않아 예약 가능한 시간대에 잘못된 예약 가능 슬롯이 표시됩니다.

임시 해결 방법

이 문제는 WooCommerce Multilingual & Multicurrency 5.5.2에서 해결되었습니다. 업데이트하면 사이트에서 문제가 해결되므로, 아직 업데이트할 수 없는 경우에만 이 임시 해결 방법이 필요합니다.

개발팀에서 이 문제를 수정 중입니다. 당분간 WCML 5.5.0으로 되돌리거나 /wp-content/plugins/woocommerce-multilingual/compatibility/WcBookings/class-wcml-bookings.php로 이동하여 코드를 패치할 수 있습니다.
다음 코드를:

PHP
$booking_order_ids = [];
array_walk( $existing_bookings, function ( WC_Booking $booking ) use ( &$booking_order_ids ) {
	/* @phpstan-ignore-next-line */
	$booking_order_ids[] = $booking->get_order_id();
} );
$unique_ids = array_unique( $booking_order_ids ); // when blocked, we don't want each N-language variation to occupy one slot

return count( $unique_ids );
다음과 같이 수정하세요.
PHP
			$booking_person_counts_by_order = [];

			foreach ( $existing_bookings as $booking ) {
				/** @var WC_Booking $booking */
				$order_id = $booking->get_order_id();

				// Skip if already counted this order ID (to avoid double-counting translations)
				if ( isset( $booking_person_counts_by_order[ $order_id ] ) ) {
					continue;
				}

				// Get total persons (sum of all person types for this booking)
				$person_counts = array_sum( $booking->get_person_counts() );

				// Store count by order ID
				$booking_person_counts_by_order[ $order_id ] = $person_counts;
			}

// Return total number of persons across unique orders
			return array_sum( $booking_person_counts_by_order );

모든 알려진 문제

여전히 이 문제가 발생합니까?

업데이트해도 문제가 해결되지 않으면 지원 문의를 하세요. 함께 살펴보겠습니다.