Just built a new site all in Pro and the terms & Conditions page in Woocommerce would only show code. none of the other topics i found resolved my issues, the JS popup worked but on my site the div was still toggled and customers could see my ugly code instead of the page. installing Visual composer did absolutely nothing I still saw the code. I cant build just using Classic elements because I am using a new install and have all the new sections and rows not classic ones so i still see the code wrapped around my classic elements.
i did find this piece of code that disables the div toggle and opens the page on a new tab, it will work for now but I would like to see some sort of fix to this bug.
Here is the code, simply use Code Snippets plugin or add to your functions.php
function disable_wc_terms_toggle() {
wp_enqueue_script( 'disable-terms-toggle', '/disable-terms-toggle.js', array( 'wc-checkout', 'jquery' ), null, true );
wp_add_inline_script( 'disable-terms-toggle', "jQuery( document ).ready( function() { jQuery( document.body ).off( 'click', 'a.woocommerce-terms-and-conditions-link' ); } );" );
}
add_action( 'wp_enqueue_scripts', 'disable_wc_terms_toggle', 1000 );
Thanks!