View pmpro_haspaid_shortcode_example.php
[haspaid level="1" paid="0"] | |
<div class="pmpro_message pmpro_default"> | |
<h2>Unlock Additional Members-only Content!</h2> | |
You are currently on a free trial membership. To unlock additional content, please upgrade now to a full membership. | |
[pmpro_checkout_button level="1" text="Upgrade to Gold Membership"] | |
</div> | |
[/haspaid] |
View pmpro_haspaid_shortcode_example2.php
[membership level="1"] | |
[haspaid level="2" paid="1"] | |
<div class="pmpro_message pmpro_default"> | |
<h2>Baby come back—and save $50</h2> | |
I see that you used to be a Platinum level member. I wanted to extend a one-time offer for you to upgrade to Platinum today and save $50. | |
[memberlite_btn style="action" href="/membership-checkout/?level=2&discount_code=50OFF" text="Upgrade to Platinum Membership" icon="heart"] | |
</div> | |
[/haspaid] |
View my_pmprorh_after_email_init_maxk97.php
<?php | |
function my_pmprorh_after_email_init() { | |
//don't break if Register Helper is not loaded | |
if( !function_exists( 'pmprorh_add_registration_field') ) { | |
return false; | |
} | |
//define the fields | |
$fields_after_email = array(); | |
View custom_pmproeewe_email_frequency.php
<?php | |
/** | |
* Filter the settings of email frequency sent when using the Extra Expiration Warning Emails Add On | |
* https://www.paidmembershipspro.com/add-ons/extra-expiration-warning-emails-add-on/ | |
* | |
* Update the $settings array to your list of number of days => ''. | |
* Read the Add On documentation for additional customization using this filter. | |
*/ | |
function custom_pmproeewe_email_frequency( $settings = array() ) { |
View custom_pmproeewe_email_frequency_and_templates.php
<?php | |
/** | |
* Filter the settings of email frequency and template sent when using the Extra Expiration Warning Emails Add On | |
* https://www.paidmembershipspro.com/add-ons/extra-expiration-warning-emails-add-on/ | |
* | |
* Update the $settings array to your list of number of days => 'template_name'. The example below uses a custom | |
* email template added to your active theme in a new 'paid-memberships-pro/emails' custom folder. | |
* The email file name is listed without its .html extension. | |
*/ |
View my_pmprorh_after_email_init_igbc.php
<?php | |
function my_pmprorh_after_email_init_igbc() { | |
//don't break if Register Helper is not loaded | |
if( !function_exists( 'pmprorh_add_registration_field') ) { | |
return false; | |
} | |
//define the fields | |
$fields_after_email = array(); | |
View pmprodon_pmpro_donation_recurring.php
<?php | |
/* | |
* This gist adds recurring functionality to the Donations Add On for Paid Memberships Pro. | |
* It adds the user-entered 'donation amount' to their recurring billing amount. | |
*/ | |
//add donation amount to recurring payment amount | |
function pmprodon_pmpro_donation_recurring( $level ) { | |
if( isset( $_REQUEST['donation'] ) ) { | |
$donation = preg_replace( '[^0-9\.]', '', $_REQUEST['donation'] ); |
View my_pmprorh_after_email_checkboxes_init.php
<?php | |
function my_pmprorh_after_email_checkboxes_init() { | |
//don't break if Register Helper is not loaded | |
if( !function_exists( 'pmprorh_add_registration_field') ) { | |
return false; | |
} | |
//define the fields | |
$fields_after_email = array(); | |
View my_pmpro_discount_code_toggle.php
<?php | |
//Change the text of the discount code area on membership checkout | |
function my_pmpro_discount_code_toggle( $translated_text, $text, $domain ) { | |
if( $domain == 'paid-memberships-pro' ) { | |
$translated_text = str_replace( 'Click here to enter your discount code', 'Have a discount code?', $translated_text); | |
$translated_text = str_replace( 'Do you have a discount code?', '', $translated_text); | |
} | |
return $translated_text; | |
} | |
add_filter( 'gettext', 'my_pmpro_discount_code_toggle', 10, 3); |
View add_pmpro_level_id_to_body_class.php
<?php | |
/** | |
* Add the member's level ID to the <body> tag's "class" attribute. | |
* | |
* 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/ | |
* | |
*/ |