Package durationsΒΆ

If “week”, “month” and “year” does not fit your requirements as a package duration, you can add your own using horizon_package_durations filter.

Example how to add “3 days” package duration:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
add_filter( 'horizon_package_durations', 'add_package_duration' );

function add_package_duration( $package_durations ) {
    $package_durations[] = array(
        'key' => 'three_days',
        'display' => __( '3 days', 'horizon' ),
        'length' => '+3 day'
    );
    return $package_durations;
}

Warning

Value of length attribute have to be parameter for strtotime function.