MemberPress: Disable Reminders if a Member has Any Active Subscription

add_filter(‘mepr_sub_expires_reminder_disable’, ‘mepr_disable_reminders’, 10, 4); add_filter(‘mepr_sub_renews_reminder_disable’, ‘mepr_disable_reminders’, 10, 4); add_filter(‘mepr_signup_abandoned_reminder_disable’, ‘mepr_disable_reminders’, 10, 4); add_filter(‘mepr_member_signup_reminder_disable’, ‘mepr_disable_reminders’, 10, 4); function mepr_disable_reminders($disable_email, $reminder, $usr, $prd) { $active_product_subscriptions = $usr->active_product_subscriptions(‘ids’); // Disable reminders if member has any active subscription. if(!empty($active_product_subscriptions)) { $disable_email = true; }…Continue reading

MemberPress: Dynamic Trial Periods

//Sets up a trial period on MemberPress such that ALL users renew on March 31st. function mepr_days_until($date){ return (isset($date)) ? floor((strtotime($date) – time())/60/60/24) : false; } function mepr_update_mepr_trial_period() { $prd = new MeprProduct(123); //CHANGE 123 to the ID of your…Continue reading

MemberPress: Limit Phone Number Digits

function mepr_limit_phone_digits( $errors ) { $phone = isset( $_POST[‘mepr_phone_number’] ) ? sanitize_text_field(trim($_POST[‘mepr_phone_number’])) : ”; // Remove all non-numeric characters from the phone number. $phone = preg_replace(“/[^0-9]/”, “”, $phone); // Check if phone digits equal 11 if (strlen($phone) != 11) {…Continue reading