Skip to content

Instantly share code, notes, and snippets.

@ideadude
Created February 21, 2023 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ideadude/2ce102d7fd554172e4e2a98d80e74352 to your computer and use it in GitHub Desktop.
Save ideadude/2ce102d7fd554172e4e2a98d80e74352 to your computer and use it in GitHub Desktop.
Update the TOS on the PMPro checkout page to skip the escaping introduced in PMPro 2.10.
<?php
/**
* Update the TOS on the PMPro checkout page to skip the escaping
* introduced in PMPro 2.10. This will work in PMPro 2.10.1 or higher.
*
* You can add this code to your site using the Code Snippets plugin or by
* placing the code into a custom plugin or your theme's functions.php.
*/
function my_unescaped_pmpro_tos_content( $content, $tospage ) {
return do_shortcode( $tospage->post_content );
}
add_filter( 'pmpro_tos_content', 'my_unescaped_pmpro_tos_content', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment