Compare commits

...

2 commits

Author SHA1 Message Date
9be7cb2ce2 removed more unused code
Some checks failed
PHP Code Checker / PHP Code Checker (pull_request) Failing after 35s
PHPUnit / PHPUnit – PHP 8.1 (pull_request) Successful in 57s
PHPUnit / PHPUnit – PHP 8.2 (pull_request) Successful in 1m1s
PHPUnit / PHPUnit – PHP 8.3 (pull_request) Successful in 59s
2024-09-29 13:50:52 +02:00
20f6947bea duplicated code 2024-09-29 13:48:37 +02:00
2 changed files with 2 additions and 18 deletions

View file

@ -75,9 +75,6 @@ final class Events_Manager extends Event_Transformer {
if ( $em_location->location_state ) { if ( $em_location->location_state ) {
$address['addressRegion'] = $em_location->location_state; $address['addressRegion'] = $em_location->location_state;
} }
if ( $em_location->location_postcode ) {
$address['postalCode'] = $em_location->location_postcode;
}
$location->set_address( $address ); $location->set_address( $address );
return $location; return $location;
@ -124,8 +121,8 @@ final class Events_Manager extends Event_Transformer {
* @return int * @return int
*/ */
public function get_remaining_attendee_capacity() { public function get_remaining_attendee_capacity() {
$em_bookings = $this->em_event->get_bookings()->get_bookings(); $em_bookings_count = $this->get_participant_count();
$remaining_attendee_capacity = $this->em_event->event_spaces - count( $em_bookings->bookings ); $remaining_attendee_capacity = $this->em_event->event_spaces - $em_bookings_count;
return $remaining_attendee_capacity; return $remaining_attendee_capacity;
} }

View file

@ -53,19 +53,6 @@ final class GatherPress extends Event {
$this->gp_venue = $this->gp_event->get_venue_information(); $this->gp_venue = $this->gp_event->get_venue_information();
} }
/**
* Get supported post types.
*
* Retrieve the list of supported WordPress post types this transformer widget can handle.
*
* @since 1.0.0
* @access public
* @return array Widget categories.
*/
public static function get_supported_post_types() { // todo can we remove this or is this in use?
return array( GatherPress_Event::POST_TYPE );
}
/** /**
* Get the event location. * Get the event location.
* *