WooCommerce Terms New Tab

WooCommerce Terms and Conditions Link in a New Tab

In this tutorial, we’re going to learn How to open the WooCommerce Terms and Conditions Link in a New Tab.

WooCommerce displays the terms and Conditions checkbox with a link when someone goes to order something from WooCommerce Store. If a customer wants to read the terms and conditions, it is displayed in a small area of the payment form. For this result, it is really hard to read and scroll. As a result, Your customer may be annoyed and you may lose your customer. To solve this issue, We have found a better solution is to have the link open in a new tab. To do that copy the following PHP code and paste it to your WP parent or child theme’s functions.php file.

 ** Force WooCommerce terms and conditions link to open in a new page when clicked on the checkout page
function fwp_woocommerce_checkout_terms_and_conditions() {
  remove_action( 'woocommerce_checkout_terms_and_conditions', 'wc_terms_and_conditions_page_content', 30 );
add_action( 'wp', 'fwp_woocommerce_checkout_terms_and_conditions' );

WooCommerce Terms New Tab

Note : If you create your terms and conditions page with Javascript, on the checkout page the content will not display within the accordion area. This happens because of WordPress security reasons. That’s why you need to have the WooCommerce terms and conditions link open in a new tab.

N.B. This is a developer-level tutorial. If you feel, it’s difficult to do for you. You may consider hiring me through Fiverr. I’ll do it for you.

Table of Contents :

Leave a Comment

Your email address will not be published.