Skip to content

Commit

Permalink
removed function from #1418
Browse files Browse the repository at this point in the history
  • Loading branch information
hansmorb committed Nov 21, 2023
1 parent 2ddceff commit 45da0ca
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/Model/Timeframe.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function getLatestPossibleBookingDateTimestamp() {
$calculationBase = time();

// if meta-value not set we define a default value far in the future so that we count all possibly relevant timeframes
$advanceBookingDays = $this->getAdvanceBookingDays( TimeFrame::META_TIMEFRAME_ADVANCE_BOOKING_DAYS ) ?: 365;
$advanceBookingDays = $this->getMeta( TimeFrame::META_TIMEFRAME_ADVANCE_BOOKING_DAYS ) ?: 365;

// we subtract one day to reflect the current day in calculation
$advanceBookingDays --;
Expand All @@ -173,21 +173,6 @@ public function getLatestPossibleBookingDateTimestamp() {

}

/**
* Gets the maximum number of days that can be booked in advance.
* @return void
*/
public function getAdvanceBookingDays() {
if ( $this->isUserPrivileged()) {
return 365;
}
else {
return intval(
$this->getMeta( self::META_TIMEFRAME_ADVANCE_BOOKING_DAYS ) ?? \CommonsBooking\Wordpress\CustomPostType\Timeframe::ADVANCE_BOOKING_DAYS
);
}
}

/**
* This function will get the formatted end date of the timeframe.
* This is used to display the end date of the timeframe in the frontend.
Expand Down

0 comments on commit 45da0ca

Please sign in to comment.