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 | |
/** | |
* Restrict Membership Signup by Email Domain | |
* Make sure to edit the $valid_domains array defined further below | |
* to include only the domains you'd like to allow. | |
* | |
* Add this code to a custom plugin. More info: 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 | |
/** | |
* This recipe adds Biographical Info to the Membership Checkout. | |
* | |
* 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 | |
/* | |
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
// overwite the account shortcode | |
function overwite_pmpro_shortcode_account($atts, $content=null, $code="") | |
{ | |
global $wpdb, $pmpro_msg, $pmpro_msgt, $pmpro_levels, $current_user, $levels; | |
// $atts ::= array of attributes | |
// $content ::= text within enclosing form of shortcode element | |
// $code ::= the shortcode found, when == callback name | |
// examples: [pmpro_account] [pmpro_account sections="membership,profile"/] |
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 filter will search your codebase for translatable strings and replace when an exact match is found. | |
* | |
* Here we're changing 'Membership' to 'Subscription' for Paid Memberships Pro. | |
* | |
* Add this code to your PMPro Customizations Plugin | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
* Note: When adding to your Customizations Plugin, be careful not to include the opening php tag on line 1 above. | |
* |
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 | |
/** | |
* Adjust email template according to user's level that they are checking out for. | |
* Add this code to your PMPro Customizations plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
* For more information in customizing emails in Paid Memberships Pro visit - https://www.paidmembershipspro.com/documentation/member-communications/customizing-email-templates/ | |
* List of available email templates - https://www.paidmembershipspro.com/documentation/member-communications/list-of-pmpro-email-templates/ | |
*/ | |
function adjust_pmpro_email_according_to_level( $email ){ |
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 multiple upload fields to the profile 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 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 no copy this line | |
//Copy lines 5 onwards into your PMPro custom plugin -> http://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
function pmprowoo_redirect_member(){ | |
if( is_user_logged_in() && function_exists('pmpro_hasMembershipLevel') && pmpro_hasMembershipLevel() ){ //check if user is logged in, pmpro is installed and user has an active level. | |
global $current_user; | |
$current_user->membership_level = pmpro_getMembershipLevelForUser($current_user->ID); //get current users level ID |
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 | |
/** | |
* Stop members from renewing their current membership level. | |
* Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function stop_members_from_renewing( $okay ) { | |
// If something else isn't okay, stop from running this code further. |
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 PLEASE!! | |
/** | |
* Hide prices + add to cart from non members in Paid Memberships Pro. | |
* Redirect non members from cart, checkout and single products page. | |
* Add this custom code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
* Visit www.paidmembershipspro.com for assistance. | |
*/ | |
function remove_my_woo_prices( $price, $product ) { |