-
-
Save saas786/4019088ceaa6f94c9b6e1af17aeb2b10 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 hidden or 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