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. | |
/** | |
* This recipe will hide level 2 from non-members | |
* | |
* 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/ | |
*/ | |
function adjusting_the_pmpro_levels_array( $levels ) { |
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 | |
/** | |
* Change the statement descriptor for Stripe charges and subscriptions. | |
* This is the message shown on the customer's credit card statement. | |
* Must contain at least one letter, 22 characters max. | |
* | |
* Requires PMPro 2.4.1+ | |
* | |
* Note: If your descriptor includes invalid characters or | |
* more than 22 chacters, checkout will fail. |
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 | |
/** | |
* Replace user's login displayed to email address in the "You are logged in as" | |
* on the PMPro checkout page. | |
* | |
* 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 | |
/** | |
* Adds an email variable !!tax!! to Paid Memberships Pro emails. | |
* Only works for email templates that has the !!invoice_id!! variable available. | |
* Use the Email Templates Admin Editor to add !!tax!! to your email templates. | |
* Follow this guide to add this code to your site: https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
* | |
* Difficulty: Easy | |
*/ | |
function my_pmpro_email_variable( $data, $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 // DO NOT COPY THIS LINE | |
<?php // do not copy this line. | |
/** | |
* This recipe will redirect a new members after checkout for a specific level | |
* See full article here: | |
*. https://www.paidmembershipspro.com/set-up-unique-membership-confirmation-pages-based-on-level/ | |
* | |
* 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. |
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 assumes that Gravatar (or one of it's services is set as the default WP avatar option). | |
* Adjust this code and insert your own URL to the default avatar. | |
* Add this code to your site by following a guide like - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_bua_default_avatar_image( $avatar, $id_or_email ) { | |
if ( strpos( $avatar, 'gravatar.com' ) !== 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 | |
/** | |
* This recipe adds a Fontawesome 5 icon before a custom field containing | |
* a URL on the Member Directory and Profile pages. | |
* | |
* This recipe assumes that Fontawesome 5 support is made available either | |
* via the active theme or a plugin. | |
* | |
* WordPress auto-embeds feeds from certain oEmbed providers, e.g. Twitter. | |
* https://wordpress.org/support/article/embeds/ |
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 will change the text Level or Levels to your preferred text. | |
* | |
* 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 | |
/** | |
* Change or translate text strings for PMPro Multiple Memberships Per User. | |
* | |
* This recipe assumes and requires that both PMPro core and PMPro Multiple Memberships Per User are active. | |
* | |
* 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 | |
/** | |
* Adds % tax to level 2 if billing address is in the set country. | |
* | |
* 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/ | |
*/ | |
function my_pmpro_country_tax( $tax, $values, $order ) { |