Skip to content

Instantly share code, notes, and snippets.

@JarrydLong
Last active February 8, 2023 12:00
Show Gist options
  • Save JarrydLong/17d3822a8d3f9787c4142acee807d968 to your computer and use it in GitHub Desktop.
Save JarrydLong/17d3822a8d3f9787c4142acee807d968 to your computer and use it in GitHub Desktop.
<?php //do not copy
/**
* This recipe removes the parameters for the page that gets created for each order.
* This ensures that only the user's page is created and no other pages for each level are created.
*
* 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 mypmpro_user_page_purchase_postdata( $postdata, $user, $level ){
$postdata = array();
return $postdata;
}
add_filter( 'pmpro_user_page_purchase_postdata', 'mypmpro_user_page_purchase_postdata', 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment