| @@ -1,8 +1,12 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | namespace Booktics\Settings; |
| 4 | 4 | |
| 5 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 6 | + exit; | |
| 7 | +} | |
| 8 | + | |
| 5 | 9 | use Booktics\Services\Schedule_Record; |
| 6 | 10 | |
| 7 | 11 | /** |
| 8 | 12 | * Settings class |
| @@ -38,9 +42,9 @@ | ||
| 38 | 42 | if ( ! $key ) { |
| 39 | 43 | return $settings; |
| 40 | 44 | } |
| 41 | 45 | |
| 42 | - if ( isset( $settings[ $key ] ) ) { | |
| 46 | + if ( isset( $settings[ $key ] ) && $settings[ $key ] ) { | |
| 43 | 47 | return $settings[ $key ]; |
| 44 | 48 | } |
| 45 | 49 | |
| 46 | 50 | return $default; |
| @@ -134,8 +138,14 @@ | ||
| 134 | 138 | ), |
| 135 | 139 | ), |
| 136 | 140 | 'holiday' => array(), |
| 137 | 141 | 'custom' => array(), |
| 142 | + 'allow_customer_as_wp_user' => false, | |
| 143 | + 'pending_reservation_timeout' => 10, | |
| 144 | + // WooCommerce checkout is stripped down by default: the booking form | |
| 145 | + // already collected the customer, so billing fields would ask twice. | |
| 146 | + 'wc_show_billing_fields' => false, | |
| 147 | + 'wc_thankyou_page' => 'woocommerce', | |
| 138 | 148 | ); |
| 139 | 149 | |
| 140 | 150 | return apply_filters( 'booktics_default_settings', $defaults ); |
| 141 | 151 | } |