Skip to content

Instantly share code, notes, and snippets.

@jessepearson
Last active October 12, 2022 05:59
Show Gist options
  • Save jessepearson/41c8a872479ff9f02046956c0725bd9a to your computer and use it in GitHub Desktop.
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.
<?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