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
/* | |
Redirect MEPR IPN URL to the PMPro IPN URL, e.g. | |
https://yoursite.com/mepr/notify/onibvz-5w6/ipn => | |
https://yoursite.com/wp-admin/admin-ajax.php?action=ipnhandler | |
Update line 9 to match the IPN URL given to you by MEPR | |
*/ | |
function my_ipn_redirect() { | |
if( defined('PMPRO_DIR') && $_SERVER['REQUEST_URI'] === '/mepr/notify/onibvz-5w6/ipn' ) { | |
require_once(PMPRO_DIR . "/services/ipnhandler.php"); |
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 | |
/** | |
* This recipe changes localized text strings for | |
* Add Name to Checkout Add On using the gettext filter. | |
* | |
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext | |
* | |
* 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. |
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 | |
/** | |
* This recipe changes localized text strings for | |
* Add Name to Checkout Add On using the gettext filter. | |
* | |
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext | |
* | |
* 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. |
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 // do not copy this line | |
/** | |
* This recipe changes login page text strings with the gettext filter | |
* | |
* 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/ | |
*/ |
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 | |
/** | |
* Redirect member back to Addon Packages page after 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/ | |
*/ |
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 | |
/** | |
* Generate a username at PMPro checkout from email for users. | |
* Hide your 'username' field using custom CSS. | |
* Add this code to your site by following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_pmpro_generate_username_at_checkout() { | |
// Make sure PMPro is installed and the function to get the level at checkout exists. |
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
/** | |
* Change PMPro to not track visits at all | |
* Add this code into a custom plugin or code snippet. | |
*/ | |
function my_pmpro_report_login_wp_visits_only_for_users() { | |
remove_action( 'wp', 'pmpro_report_login_wp_visits' ); | |
} | |
add_action( 'init', 'my_pmpro_report_login_wp_visits_only_for_users' ); |
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 | |
/** | |
* PMPro 3.1+ compatible | |
* Small jQuery snippet to move password field below email field for Paid Memberships Pro. | |
* Please note this will affect all instances such as Signup Shortcode, checkout page. | |
* To only load this on a specific page, please use the 'is_page' WordPress function in a condition. | |
*/ | |
function my_move_password_below_bemail() { | |
?> | |
<script> |
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 // do not copy this line | |
/* | |
* This recipe would always show the renew link on the membership account page for the specified levels on line 13 | |
* Add the below code to your PMPro Customizations Plugin: | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
// always show renew links for certain levels if the member already has that level. |
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
//Changes default content | |
function mypmpro_change_user_pages_content($postdata, $user, $level){ | |
$postdata['post_content'] = 'My Content Here'; | |
return $postdata; | |
} | |
add_filter('pmpro_user_page_postdata', 'mypmpro_change_user_pages_content', 10, 3); |
NewerOlder