This file contains hidden or 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 shortcode will display the members list and additional content based on the defined attributes. | |
| */ | |
| function pmpromd_shortcode($atts, $content=null, $code="") | |
| { | |
| // $atts ::= array of attributes | |
| // $content ::= text within enclosing form of shortcode element | |
| // $code ::= the shortcode found, when == callback name | |
| // examples: [pmpro_member_directory show_avatar="false" show_email="false" levels="1,2"] |
This file contains hidden or 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 example sends two custom fields from WordPress to AWeber through the PMPro AWeber addon. | |
| * Go to Aweber to create your custom field(s) | |
| * Make sure the custom field in aweber matches the input name for your custom fields added via the Register Helper extension | |
| * Add this code to your active theme's functions.php or a custom plugin: https://www.paidmembershipspro.com/how-to-add-code-to-wordpress/ | |
| */ | |
| function my_pmpro_aweber_custom_fields( $fields, $user ) { |
This file contains hidden or 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 | |
| /** | |
| * Change the email address to three other recipients for all admin related emails in Paid Memberships Pro. | |
| * Follow this guide to add custom code to your WordPress site - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| */ | |
| function my_pmpro_change_admin_to_email( $user_email, $email ){ | |
| if( strpos( $email->template, "_admin" ) !== false ) { | |
| $user_email = '[email protected], [email protected], [email protected]'; |
This file contains hidden or 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 | |
| /** | |
| * Add bcc for PMPro admin emails | |
| * Follow this guide to add custom code to your site - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| */ | |
| function my_pmpro_email_headers_admin_emails($headers, $email) { | |
| // bcc emails already going to admin_email | |
| if (strpos($email->template, '_admin') !== false) { |
This file contains hidden or 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 disable the recurring payment email reminders for the specifc levels stated | |
| * | |
| * 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 hidden or 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 | |
| /** | |
| * Disables sending a invoice emails for check orders whenever an order is saved | |
| * in success status. | |
| * | |
| * 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 hidden or 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 from below here... | |
| /* | |
| * Translates the PMPro Not Logged In text while using Polylang. | |
| * Currently set up to use US English and Spain Spanish. | |
| */ | |
| function my_pmpro_polylang_translate_notloggedintext( $value, $options ) { | |
| switch ( get_locale() ) { |
This file contains hidden or 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 | |
| /* | |
| Plugin Name: Paid Memberships Pro - Australia GST | |
| Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-australia-gst/ | |
| Description: Apply Australia GST to Checkouts with PMPro | |
| Version: .1 | |
| Author: Stranger Studios | |
| Author URI: http://www.strangerstudios.com | |
| */ |
This file contains hidden or 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 would always show the renew link on the membership account page for the specified levels on line 13 | |
| * Add the below code to your PMPro Customizations Plugin: | |
| * https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| */ | |
| // always show renew links for certain levels if the member already has that level. |
This file contains hidden or 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
| <h3>Lorem Isupm, !!display_name!!</h3> | |
| <p>Any content can be added here.</p> | |
| <p>Please see the <i>Variable Reference</i> at https://www.paidmembershipspro.com/add-ons/email-templates-admin-editor/</p> | |
| <p>Account: !!display_name!! (!!user_email!!)</p> | |
| <p>Log in to your membership account here: !!login_link!!</p> |