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 CODE CAN BE PASTED INTO A PLUGIN LIKE Code Snippets, My Custom Functions, or placed in a Child Theme's functions.php file | |
// Begin copying from line #4 below | |
function disable_mepr_reminder_if_cancelled_or_upgraded($disable_email, $reminder, $usr, $prd) { | |
global $wpdb; | |
//BEGIN EDITING | |
$annual_membership_id = 2974; | |
$monthly_membership_id = 2973; | |
//STOP EDITING |
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 code can be pasted into a plugin like Code Snippets or My Custom Functions or | |
// pasted into a child-theme's functions.php file | |
// You might have a Rule protecting all posts, but want posts with a certain category | |
// to be unprotected. | |
// You can do that with the code below. | |
// EDIT: You will need to edit the category_slug_here part is all. |
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 | |
/* | |
Plugin Name: MemberPress Display Name | |
Plugin URI: https://memberpress.com | |
Description: Adds a Display Name field to MemberPress signup and account pages | |
Version: 1.0 | |
Author: Caseproof, LLC | |
Author URI: http://caseproof.com/ | |
Copyright: 2004-2014, Caseproof, LLC | |
*/ |
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 | |
/* | |
Plugin Name: MemberPress + New User Approve | |
Version: 1.0.0 | |
Author: Caseproof, LLC | |
Author URI: http://caseproof.com | |
Description: Helps the flow of signups from approved/unapproved domains between the MemberPress and New User Approve plugins | |
*/ | |
function mepr_get_approved_domains() { |
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 | |
function mepr_sync_user_pro_visibility($txn, $status = false) { | |
global $userpro; | |
if(class_exists('MeprUser')) { | |
$user = new MeprUser($txn->user_id); | |
//Make sure it's a valid user still | |
if(!isset($user->ID) || !$user->ID) { return; } |
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 | |
function limit_signups_to_one_country($errors) { | |
// Limit Signups to USA only | |
if(!isset($_POST['mepr-address-country']) || $_POST['mepr-address-country'] != 'US') { | |
$errors[] = 'Sorry, signups are currently limited to USA only.'; | |
} | |
return $errors; | |
} | |
add_filter('mepr-validate-signup', 'limit_signups_to_one_country'); |
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 disables the admin email notice of password resets in MemberPress. | |
// In some cases WordPress still sends its own out, there may be other plugins | |
// that will disable the WP one. | |
function disable_lost_and_changed_mepr($recipients, $subject, $message, $headers) { | |
if(strpos(strtolower($subject), 'password lost') !== false) { | |
$recipients = array(); | |
} | |
return $recipients; |
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 code adds a new shortcode similar to MemberPress' [mepr-account-info] | |
// However, it also adds an "id" parameter which will get info for a specific user | |
// by their ID. | |
// | |
// Sample Usage: [mepr-account-info-extended field="slug" id="123"] | |
// field = The slug of your usermeta or custom field | |
// id = The WP User ID of the user you wish to pull information for | |
// List of available slugs here: https://docs.memberpress.com/article/112-available-shortcodes | |
// |
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
DELETE FROM wp_postmeta WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type = 'pretty-link'); | |
DELETE FROM wp_posts WHERE post_type = 'pretty-link'; | |
UPDATE wp_prli_links SET link_cpt_id = NULL; | |
UPDATE wp_options SET option_value = 1 WHERE option_name = 'prli_db_version'; | |
UPDATE wp_options SET option_value = 1 WHERE option_name = 'prlipro_db_version'; |