set default status in the transformer
This commit is contained in:
parent
4aad867d1f
commit
a8627cdb02
2 changed files with 8 additions and 1 deletions
|
@ -168,6 +168,13 @@ abstract class Event extends Post {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default value for the event status.
|
||||||
|
*/
|
||||||
|
protected function get_status(): ?string {
|
||||||
|
return 'CONFIRMED';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compose a human readable formatted start time.
|
* Compose a human readable formatted start time.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -94,7 +94,7 @@ final class The_Events_Calendar extends Event {
|
||||||
*
|
*
|
||||||
* @return string status of the event
|
* @return string status of the event
|
||||||
*/
|
*/
|
||||||
public function get_status() {
|
public function get_status(): ?string {
|
||||||
if ( 'canceled' === $this->tribe_event->event_status ) {
|
if ( 'canceled' === $this->tribe_event->event_status ) {
|
||||||
return 'CANCELLED';
|
return 'CANCELLED';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue