Skip to content

Commit 5a3b52a

Browse files
committed
gpi-populate-days.php: Added new snippet.
1 parent 1e78b4f commit 5a3b52a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gp-inventory/gpi-populate-days.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,19 @@ function gw_populate_days_into_radio( $form ) {
6161
$start_day = new DateTime( 'this ' . $day );
6262

6363
// If it's past the cutoff, also skip this week's day
64-
if ( ( $today->format( 'N' ) == $cutoff_day && ( int )$today->format( 'H' ) >= $cutoff_time ) || $today->format( 'N' ) > $cutoff_day && $today->format( 'N' ) <= $start_day->format( 'N' ) ) {
64+
if ( ( $today->format( 'N' ) == $cutoff_day && (int) $today->format( 'H' ) >= $cutoff_time ) || $today->format( 'N' ) > $cutoff_day && $today->format( 'N' ) <= $start_day->format( 'N' ) ) {
6565
$start_day->modify( '+1 week' );
6666
}
6767

6868
// Generate next n days
6969
for ( $i = 0; $i < $number_of_days; $i++ ) {
7070
$label = $start_day->format( $format );
71-
$choices[] = array(
71+
$choices[] = array(
7272
'text' => $label,
7373
'value' => $label,
7474
'inventory_limit' => $inventory,
7575
);
76-
$start_day->modify('+1 week');
76+
$start_day->modify( '+1 week' );
7777
}
7878

7979
$field->choices = $choices;

0 commit comments

Comments
 (0)