| 1 |
<?php |
| 2 |
/** |
| 3 |
* Account Page Template |
| 4 |
* Template for rendering the customer account page |
| 5 |
*/ |
| 6 |
|
| 7 |
// Prevent direct access |
| 8 |
if (!defined('ABSPATH')) { |
| 9 |
exit; |
| 10 |
} |
| 11 |
|
| 12 |
// Get current user |
| 13 |
$current_user = wp_get_current_user(); |
| 14 |
|
| 15 |
// If user is not logged in, redirect to login |
| 16 |
if (!$current_user->ID) { |
| 17 |
$login_url = home_url('/login'); |
| 18 |
wp_redirect($login_url); |
| 19 |
exit; |
| 20 |
} |
| 21 |
|
| 22 |
?> |
| 23 |
<!DOCTYPE html> |
| 24 |
<html <?php language_attributes(); ?>> |
| 25 |
<head> |
| 26 |
<meta charset="<?php bloginfo('charset'); ?>"> |
| 27 |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
| 28 |
<title><?php echo esc_html(get_bloginfo('name')) . ' - ' . __('My Account', 'yatra'); ?></title> |
| 29 |
<?php wp_head(); ?> |
| 30 |
</head> |
| 31 |
<body <?php body_class(); ?>> |
| 32 |
<?php |
| 33 |
$yatra_account_react_embed = false; |
| 34 |
require YATRA_PLUGIN_PATH . 'templates/partials/account-react-root.php'; |
| 35 |
?> |
| 36 |
<?php wp_footer(); ?> |
| 37 |
</body> |
| 38 |
</html> |
| 39 |
|
| 40 |
|