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
//set price | |
function pmprodon_pmpro_donation_recurring($level) | |
{ | |
if(isset($_REQUEST['donation'])) | |
$donation = preg_replace("[^0-9\.]", "", $_REQUEST['donation']); | |
else | |
return $level; | |
if(!empty($donation)) | |
{ |
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
/* | |
Plugin Name: Register Helper Customizations | |
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/ | |
Description: Register Helper Customizations | |
Version: 1.0.0 | |
Author: StrangerStudios | |
Author URI: http://www.paidmembershipspro.com/ | |
*/ | |
//we have to put everything in a function called on init, so we are sure Register Helper is loaded |
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
function my_pmprorh_init() | |
{ | |
//don't break if Register Helper is not loaded | |
if(!function_exists("pmprorh_add_registration_field")) | |
{ | |
return false; | |
} | |
//define the fields | |
$fields = array(); | |
$fields[] = new PMProRH_Field( |
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 function simply edits the text 'Make a Gift' for PMPRO Donations Add-On | |
Please paste this function in your functions.php or custom plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function pmpro_donations_change_text( $change_text, $text, $domain ) { | |
switch ( $change_text ) { | |
case 'Make a Gift' : | |
$change_text = __( 'This will change Make A Gift', 'pmpro-donations' ); //edit 'This will change Make A Gift' to edit the text output of 'Make a Gift' |
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
function my_pmprorh_init() | |
{ | |
//create a checkout box | |
pmprorh_add_checkout_box("mailing_info", "Mailing Details", "This description is optional"); | |
//don't break if Register Helper is not loaded | |
if(!function_exists("pmprorh_add_registration_field")) | |
{ | |
return false; | |
} | |
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 | |
/* | |
Paste this code into active theme's functions.php or custom plugin. | |
*/ | |
function my_pmprorh_init() | |
{ | |
//don't break if Register Helper is not loaded | |
if(!function_exists("pmprorh_add_registration_field")) | |
{ | |
return false; |
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 | |
//paste lines 5-39 in your functions.php or custom PMPRO plugin | |
function my_pmprorh_init() | |
{ | |
//don't break if Register Helper is not loaded | |
if(!function_exists("pmprorh_add_registration_field")) | |
{ | |
return false; |
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 Lines 5 - 32 to your functions.php of your theme or custom plugin | |
function my_pmprorh_init() | |
{ | |
//don't break if Register Helper is not loaded | |
if(!function_exists("pmprorh_add_registration_field")) | |
{ | |
return false; |
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 lines 4-15 to your custom plugin or functions.php of your active theme | |
function pmpro_remove_bfields( $pmpro_required_billing_fields ){ | |
//remove field ID's from array to make fields required | |
$remove_field = array('bfirstname', 'blastname', 'baddress1', 'bcity', 'bstate', 'bcountry', 'bzipcode', 'bphone', 'bemail', 'bconfirmemail'); | |
//loop through the $remove_field array and unset each billing field to make it optional. | |
foreach($remove_field as $field){ |
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 the function below into your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
// Use the shortcode [membership_level] to display the user's current membership level. | |
function pmpro_membership_level_shortcode( $atts ){ | |
if(is_user_logged_in() && function_exists('pmpro_hasMembershipLevel') && pmpro_hasMembershipLevel()){ | |
global $current_user; | |
$current_user->membership_level = pmpro_getMembershipLevelForUser($current_user->ID); |
OlderNewer