| @@ 423-443 (lines=21) @@ | ||
| 420 | // for the last ticket selected PRIOR to subtracting tickets |
|
| 421 | $available_spaces = $this->ticketDatetimeAvailability($ticket, true); |
|
| 422 | // greedy greedy greedy eh? |
|
| 423 | if ($available_spaces > 0) { |
|
| 424 | if ( |
|
| 425 | apply_filters( |
|
| 426 | 'FHEE__EE_Ticket_Selector___add_ticket_to_cart__allow_display_availability_error', |
|
| 427 | true, |
|
| 428 | $ticket, |
|
| 429 | $qty, |
|
| 430 | $available_spaces |
|
| 431 | ) |
|
| 432 | ) { |
|
| 433 | $this->displayAvailabilityError($available_spaces); |
|
| 434 | } |
|
| 435 | } else { |
|
| 436 | \EE_Error::add_error( |
|
| 437 | __( |
|
| 438 | 'We\'re sorry, but there are no available spaces left for this event at this particular date and time.', |
|
| 439 | 'event_espresso' |
|
| 440 | ), |
|
| 441 | __FILE__, __FUNCTION__, __LINE__ |
|
| 442 | ); |
|
| 443 | } |
|
| 444 | return false; |
|
| 445 | } |
|
| 446 | ||
| @@ 1452-1467 (lines=16) @@ | ||
| 1449 | $datetime = $this->get_latest_related_datetime(); |
|
| 1450 | $DTT_ID = $datetime instanceof EE_Datetime ? $datetime->ID() : 0; |
|
| 1451 | // verify the registration can checkin for the given DTT_ID |
|
| 1452 | } elseif (! $this->can_checkin($DTT_ID, $verify)) { |
|
| 1453 | EE_Error::add_error( |
|
| 1454 | sprintf( |
|
| 1455 | esc_html__( |
|
| 1456 | 'The given registration (ID:%1$d) can not be checked in to the given DTT_ID (%2$d), because the registration does not have access', |
|
| 1457 | 'event_espresso' |
|
| 1458 | ), |
|
| 1459 | $this->ID(), |
|
| 1460 | $DTT_ID |
|
| 1461 | ), |
|
| 1462 | __FILE__, |
|
| 1463 | __FUNCTION__, |
|
| 1464 | __LINE__ |
|
| 1465 | ); |
|
| 1466 | return false; |
|
| 1467 | } |
|
| 1468 | $status_paths = array( |
|
| 1469 | EE_Checkin::status_checked_never => EE_Checkin::status_checked_in, |
|
| 1470 | EE_Checkin::status_checked_in => EE_Checkin::status_checked_out, |
|