| 1 |
<?php |
| 2 |
/** |
| 3 |
* Setup Wizard — How bookings work (guest checkout, confirmations). |
| 4 |
* |
| 5 |
* @package Yatra |
| 6 |
*/ |
| 7 |
|
| 8 |
defined('ABSPATH') || exit; |
| 9 |
|
| 10 |
use Yatra\Services\SettingsService; |
| 11 |
|
| 12 |
$enable_guest_booking = SettingsService::get('enable_guest_booking', true); |
| 13 |
$booking_confirmation = SettingsService::get('booking_confirmation', true); |
| 14 |
?> |
| 15 |
|
| 16 |
<form method="post" class="wizard-step"> |
| 17 |
<?php wp_nonce_field('yatra-setup'); ?> |
| 18 |
<input type="hidden" name="save_step" value="bookings"> |
| 19 |
|
| 20 |
<div class="wizard-header wizard-header--task"> |
| 21 |
<p class="wizard-header-kicker"><?php echo esc_html($this->get_wizard_progress_label()); ?></p> |
| 22 |
<h1><?php esc_html_e('Booking experience', 'yatra'); ?></h1> |
| 23 |
<p class="wizard-header-lead"><?php esc_html_e('Yatra uses streamlined, pageless checkout—set the rules that match how you sell trips.', 'yatra'); ?></p> |
| 24 |
</div> |
| 25 |
|
| 26 |
<div class="wizard-content"> |
| 27 |
<div class="wizard-card"> |
| 28 |
<h3 class="wizard-card-title"><?php esc_html_e('Who can book?', 'yatra'); ?></h3> |
| 29 |
<label class="wizard-check-row"> |
| 30 |
<input type="checkbox" name="enable_guest_booking" value="true" <?php checked($enable_guest_booking, true); ?>> |
| 31 |
<span> |
| 32 |
<strong><?php esc_html_e('Allow guest bookings', 'yatra'); ?></strong> |
| 33 |
<span class="wizard-check-desc"><?php esc_html_e('Customers can complete a trip without creating a WordPress account—fewer drop-offs at checkout.', 'yatra'); ?></span> |
| 34 |
</span> |
| 35 |
</label> |
| 36 |
</div> |
| 37 |
|
| 38 |
<div class="wizard-card"> |
| 39 |
<h3 class="wizard-card-title"><?php esc_html_e('After they book', 'yatra'); ?></h3> |
| 40 |
<label class="wizard-check-row"> |
| 41 |
<input type="checkbox" name="booking_confirmation" value="true" <?php checked($booking_confirmation, true); ?>> |
| 42 |
<span> |
| 43 |
<strong><?php esc_html_e('Send booking confirmation emails', 'yatra'); ?></strong> |
| 44 |
<span class="wizard-check-desc"><?php esc_html_e('Automatically email trip and payment details so travelers have everything in their inbox.', 'yatra'); ?></span> |
| 45 |
</span> |
| 46 |
</label> |
| 47 |
</div> |
| 48 |
</div> |
| 49 |
|
| 50 |
<div class="wizard-footer"> |
| 51 |
<a href="<?php echo esc_url($this->get_step_url('business')); ?>" class="btn btn-secondary wizard-footer-back"> |
| 52 |
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline></svg> |
| 53 |
<?php esc_html_e('Back', 'yatra'); ?> |
| 54 |
</a> |
| 55 |
<div class="wizard-footer-actions"> |
| 56 |
<a href="<?php echo esc_url($this->get_next_step_link()); ?>" class="btn btn-secondary btn-skip"><?php esc_html_e('Skip', 'yatra'); ?></a> |
| 57 |
<button type="submit" class="btn btn-primary"> |
| 58 |
<?php esc_html_e('Continue', 'yatra'); ?> |
| 59 |
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg> |
| 60 |
</button> |
| 61 |
</div> |
| 62 |
</div> |
| 63 |
</form> |
| 64 |
|