JezK
Edit File: test-legacy-reservation-cancellation.php
<?php /** * Standalone Legacy Cancellation Page Loader * Place this file in WordPress root directory */ /* -------------------------------------------------- LOAD WORDPRESS CORE -------------------------------------------------- */ require_once __DIR__ . '/wp-load.php'; /* -------------------------------------------------- ENSURE WOOCOMMERCE IS LOADED -------------------------------------------------- */ if (!class_exists('WooCommerce')) { wp_die('WooCommerce is not active.'); } /* -------------------------------------------------- BASIC SECURITY (OPTIONAL BUT GOOD) -------------------------------------------------- */ // Optional: allow only logged-out users OR logged-in users // Uncomment what you need // if (!is_user_logged_in()) { // wp_redirect(wp_login_url()); // exit; // } /* -------------------------------------------------- HTML OUTPUT START -------------------------------------------------- */ ?> <div style="max-width:800px;margin:60px auto;padding:30px;border:1px solid #eee;border-radius:8px;"> <h2 style="margin-bottom:20px;"> Cancel Previous Reservation </h2> <p style="margin-bottom:25px;color:#555;"> If your reservation was created on our previous website, please submit the request below and our team will process the cancellation and refund. </p> <?php /* -------------------------------------------------- RENDER SHORTCODE FROM YOUR PLUGIN -------------------------------------------------- */ echo do_shortcode('[legacy_cancellation_form]'); ?> </div>