Compare commits

..

No commits in common. "9be7cb2ce2d0ab30a84c34952d3b79a669284435" and "608e18f8c192f78f2271b62153a364e5b1f85c49" have entirely different histories.

2 changed files with 18 additions and 2 deletions

View file

@ -75,6 +75,9 @@ final class Events_Manager extends Event_Transformer {
if ( $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 );
return $location;
@ -121,8 +124,8 @@ final class Events_Manager extends Event_Transformer {
* @return int
*/
public function get_remaining_attendee_capacity() {
$em_bookings_count = $this->get_participant_count();
$remaining_attendee_capacity = $this->em_event->event_spaces - $em_bookings_count;
$em_bookings = $this->em_event->get_bookings()->get_bookings();
$remaining_attendee_capacity = $this->em_event->event_spaces - count( $em_bookings->bookings );
return $remaining_attendee_capacity;
}

View file

@ -53,6 +53,19 @@ final class GatherPress extends Event {
$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.
*