Remove Terms and Conditions inline display on checkout

Hi guys, can you help?

It’s seem that Pro is coded to display the Woocommerce Terms and Conditions of Sale inline instead of in a new tab when the user clicks the link on the checkout page. I’d like to remove this embedded T&C content as it adds unnecessary extra weight to the checkout page. It also gives a very poor user experience.

How can I remove the embedded terms of sale page content?
How can I ensure the link open the terms of sale page in a new tab?

Thanks

Hi @stewartrandall,

Please try adding this custom JS under Theme Options > JS:

jQuery(document).ready(function($) {
	$('a.woocommerce-terms-and-conditions-link').on('click touchend', function(event) {
		event.preventDefault();
		window.location.href = $(this).attr('href');
		return false;
	});
});

Hope it helps :slight_smile:

Hey Thai, thanks for picking this up so quickly.

I’ve added the custom JS code but it doesn’t seem to have any effect. Also, I presume this is just targetting the link action? What about stopping the content from loading in to the hidden DIV?

Thanks

Hey Stewart,

Sorry for the confusion. The WooCommerce Terms and Conditions functionality is not controlled by our theme. The behavior you’ve described also is the default behavior of WooCommerce.

To change the Terms and Conditions link, go to Appearance > Customize > WooCommerce > Checkout and under Terms and conditions, replace the [terms] shortcode with an HTML link like <a href="URL_OF_PAGE" target="_blank">Terms & Conditions </a>. In the HTML code, notice that there’s a target attribute with blank value. That will open the page in a new tab.

Please note that we might not always provide WooCommerce related instructions because it is not our plugin. To learn more about WooCommerce, please read the WooCommerce documentation at https://docs.woocommerce.com/documentation/plugins/woocommerce/

Hope that helps.

Ah, thanks for clarifying. I thought it may have been a Pro template creating the checkout content. Appreciate your help.

You’re welcome.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.