To change the redirect from the Cart Page to the Checkout Page for the instant booking button in WpRentals, you can modify the code in the from the screenshot below.
Here’s how you can update it:
- Locate this line in your
wprentals/libs/ajax_functions_edit.php
file:phpprint ( wc_get_cart_url() );
- Replace it with:
php
print ( wc_get_checkout_url() );
This will ensure that the user is redirected to the WooCommerce Checkout page instead of the Cart page when they click the instant booking button.