Last active
October 12, 2022 05:59
-
-
Save jessepearson/41c8a872479ff9f02046956c0725bd9a to your computer and use it in GitHub Desktop.
Disables opening Terms and Conditions on WooCommerce Checkout page in an inline form and instead open in a new tab or window.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // do not copy this line | |
/** | |
* Disables opening the Terms and Conditions page in an inline form on the Checkout page. | |
* The Terms and Conditions link will then open in a new tab/window. | |
*/ | |
add_action( 'wp', function() { | |
remove_action( 'woocommerce_checkout_terms_and_conditions', 'wc_checkout_privacy_policy_text', 20 ); | |
remove_action( 'woocommerce_checkout_terms_and_conditions', 'wc_terms_and_conditions_page_content', 30 ); | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment