How to access to checkout page when click "Booking Now" button

Step 1: Setup Cart, Checkout page in WooCommerce Settings.

Go to WooComemrce >> Settings >> Advanced:

Step 2: Customize code in child theme

if you want to in Tour Detail page: When you click Booking button, the system will redirect to Checkout page.

Please add bellow code to functions.php file in child theme

add_filter('woocommerce_add_to_cart_redirect', 'skip_cart_go_checkout');
function skip_cart_go_checkout() {
    return wc_get_checkout_url();
}

Last updated