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 will change all instances of seat(s) to student(s) for the Sponsored Members Add On - https://www.paidmembershipspro.com/add-ons/pmpro-sponsored-members/ | |
* Add the code below to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_pmpro_change_seat_to_student( $output_text, $input_text, $domain ) { | |
if ( 'pmpro-sponsored-members' === $domain ) { | |
$output_text = str_replace( 'seats', 'students', $output_text ); | |
$output_text = str_replace( 'Seats', 'Students', $output_text ); |
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 | |
/** | |
* Add this code to your PMPro Customizations Plugin or via a code snippets plugin. | |
*/ | |
function my_pmpro_adjust_reply_to_email( $headers, $email ) { | |
// Add "Reply-To" header and set it to the user that just cancelled. | |
if( strpos($email->template, "_admin")) { | |
$headers[] = "Reply-To: " . $email->data['user_email']; |
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 | |
/** | |
* Filter to modify the days prior to renewal that the Recurring Payment Email Reminders Add On | |
* sends members the membership_recurring email notifcation. | |
* | |
* Add this code below to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function custom_pmpro_upcoming_recurring_payment_reminder( $rec_array ) { | |
$rec_array = array ( 30 => 'membership_recurring', 7 => ' membership_recurring' ); | |
return $rec_array; |
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 please. Copy from below. | |
/** | |
* This filter will search your codebase for translatable strings and replace when an exact match is found. | |
* Replace "Email Address" with "Username or Email Address" on PMPro Login Form | |
* Add this code to your PMPro Customizations Plugin: https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
add_filter( 'the_content', 'register_text', 25 ); |
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 | |
/** | |
* Sequential Member Numbers | |
* Member numbers are automatically increased from the value set for $starting_member_number after each member registration | |
* | |
* Add this code to your PMPro Customizations Plugin | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
* | |
* Requirements: |
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 | |
/** | |
* Hide discount code link on checkout for a specific level Paid Memberships Pro. | |
* Add this code below to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
* Visit www.paidmembershipspro.com for more info. | |
*/ | |
function pmpro_hide_discount_level_5() { | |
global $pmpro_pages; |
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 | |
/** | |
* Add the following code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function pmpro_move_name_fields() { | |
global $pmpro_pages; | |
?> | |
<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 | |
/** | |
* This recipe stops Contact Form 7's recaptcha javascript from loading | |
* on the PMPro checkout page. This helps prevent conflicts from recaptcha | |
* being loaded twice. | |
* | |
* 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 | |
// Copy from below here... | |
/* | |
* Adds content from Visits, Views, and Logins report to Member List to CSV export. | |
* | |
* Here is where all the columns in the Visits, Views, and Logins report are filled | |
* in case you would like to customize this Gist: | |
* https://github.com/strangerstudios/paid-memberships-pro/blob/c3129bfce929bb4f5e7dd03f5efd74c209a5530e/adminpages/reports/login.php#L215-L252 |
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 to Customizations plugin | |
/** | |
* After expiration, assign them a specific "cancelled" level. | |
* | |
* Can be used to downgrade someone to a free level when they cancel. | |
* Will allow members to the "cancel level" to cancel from that though. | |
*/ | |
function pmpro_upon_expiration_change_membership_levels( $level_id, $user_id ) { | |
// set this to the id of the original level | |
$last_level_2 = 2; |