Last active
March 28, 2021 00:27
-
-
Save kimcoleman/e2c7d0b709ab6b9bb3d3c86421a7f2b8 to your computer and use it in GitHub Desktop.
Show today's date before the content of the Terms of Service page at Membership Checkout.
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 | |
/** | |
* Show today's date before the content of the Terms of Service page at Membership Checkout. | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
* | |
*/ | |
function show_today_date_before_pmpro_tos_content( $pmpro_tos_content, $pmpro_tos ) { | |
$pmpro_tos_content = '<p>Today is ' . date( get_option( 'date_format' ) ) . '.</p>' . $pmpro_tos_content; | |
return $pmpro_tos_content; | |
} | |
add_filter( 'pmpro_tos_content', 'show_today_date_before_pmpro_tos_content', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This recipe is included in the blog post on "Show Today’s Date in the Terms of Service Box at Membership Checkout" at Paid Memberships Pro here: https://www.paidmembershipspro.com/show-todays-date-in-the-terms-of-service-box-at-membership-checkout/