Skip to content

Instantly share code, notes, and snippets.

@femiyb
Last active August 14, 2021 02:12
Show Gist options
  • Save femiyb/253535512d0df7165d4cd7f9716c25f5 to your computer and use it in GitHub Desktop.
Save femiyb/253535512d0df7165d4cd7f9716c25f5 to your computer and use it in GitHub Desktop.
Adjust Confirmation Message
<?php
/**
* This changes the default confirmation message when a user checks out.
*
* 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/
*/
// remove the default confirmation text
remove_filter( 'pmpro_confirmation_message', 'pmpro_pmpro_confirmation_message' );
// add new confirmation text
function my_pmpro_confirmation_message( $message ) {
$message = '';
$message .= "<p>This is a new confirmation message.</p>";
return $message;
}
add_filter( 'pmpro_confirmation_message', 'my_pmpro_confirmation_message', 10, 1 );
@laurenhagan0306
Copy link

This recipe is included in the blog post on "How to customize the default confirmation message shown to new members." at Paid Memberships Pro here: https://www.paidmembershipspro.com/custom-confirmation-page-content/

@jomoweb
Copy link

jomoweb commented Aug 14, 2021

Thanks, this was very helpful! For whatever reason, priority 10 was not working for me. I switched it to 20 and worked perfectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment