- This topic has 7 replies, 2 voices, and was last updated 3 years, 11 months ago by
Support Team.
- AuthorPosts
- June 13, 2019 at 5:09 am #16779
a-surbakt2000
ParticipantHi, I just wanted to add “I agree to terms and conditions” checkbox just before the “Book Now” button in the checkout page. I figure that I may be able to edit the checkout.php page and add the checkbox before the button element, I was just wondering whether this would be a safe thing to do (e.g. in case there are updates to the plug-in)?
June 13, 2019 at 12:23 pm #16814Support Team
KeymasterHello,
Yes, you can shift the position of the privacy policy message.
for this, you need to add below-given code in your child theme functions.php file.
To know how you can create and activate the child theme, refer to below-given link:
https://wptravel.io/how-to-create-a-child-theme/
After activating the child theme in your child theme functions.php file add below given code.
function wp_travel_customize_booking_form($field){ $field['payment_fields']['wp_travel_checkout_gdpr']['priority'] = 500; $field['payment_fields'] = wp_travel_sort_form_fields( $field['payment_fields'] ); return $field; } add_filter('wp_travel_checkout_fields','wp_travel_customize_booking_form', 21 );
Hope this helps.
Thank you.
June 13, 2019 at 7:18 pm #16828a-surbakt2000
ParticipantHi Support Team! Thanks for the response!
I was just wondering if it’s also possible to replace the phrase “Privacy Policy” to “Terms and Conditions”?
June 14, 2019 at 4:36 am #16841Support Team
KeymasterHello,
Actually, the text “Privacy Policy” comes from the title of the page i.e. whichever page you assign from Admin panel > Setting > Privacy, the title from that page will appear in the checkout page.
Screenshot:
Hope this clears the confusion.
If you have any issues further, kindly let us know.
Thank you.
June 14, 2019 at 5:28 am #16842a-surbakt2000
ParticipantHi Support Team, yes the title appears in the checkout page but the label on the left side still says “Privacy Policy”. I would like that to be changed as well. Also, I notice that when I attempt to tick the bock the checkmark doesn’t appear?
Btw the website is https://coolportugal.com
June 14, 2019 at 7:48 am #16849Support Team
KeymasterHello,
Add below given code in your child theme functions.php file.
function wp_travel_customize_label($field){ unset($field['wp_travel_enquiry_gdpr']); $field['payment_fields']['wp_travel_checkout_gdpr']['label'] = 'Terms & Conditions'; return $field; } add_filter('wp_travel_checkout_fields','wp_travel_customize_label' );
Hope this helps.
Thank you.
June 14, 2019 at 3:31 pm #16865a-surbakt2000
ParticipantHi Support Team,
I tried to do that but the “Terms & Conditions” text appears below the Book Now button instead.
For instance, in this screenshot : https://imgur.com/LyHwMUI, it appears in the red box, i’d like to just replace the green box with “Terms & Conditions” instead of “Privacy Policy”. Is that possible?
June 17, 2019 at 5:06 am #16911Support Team
KeymasterHello,
The code that we have provided didn’t work because you do not have the latest WP Travel plugin. You are currently using the version 1.6.0 so if you want the code to work please update to the latest version of WP Travel plugin.
Also, we did inspect the code from the version 1.0.6, but it is not possible to modify the code to make them work as you want.
Hope this clears the confusion.
If you have any issues further then kindly let us know.
Thank you.
- AuthorPosts
- The forum ‘WP Travel’ is closed to new topics and replies.