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
/** | |
* Sponsored Members setup with child seat costs and child fields at checkout. | |
*/ | |
global $pmprosm_sponsored_account_levels; | |
$pmprosm_sponsored_account_levels = array( | |
1 => array( | |
'main_level_id' => 1, | |
'sponsored_level_id' => 2, | |
'seat_cost' => 35, | |
'min_seats' => 1, |
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
/** | |
* Redirect to the membership account page instead of the home page after email validation with the PMPro Email Confirmation add on. | |
* Add this code to a custom WordPress plugin. https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_pmproec_after_validate_user() { | |
if( is_user_logged_in() ) { | |
wp_safe_redirect( '/membership-account/' ); | |
} else { | |
wp_safe_redirect( wp_login_url( '/membership-account/' ) ); | |
} |
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
/** | |
* On login, redirect to the last post viewed. | |
* Add this code into a custom plugin. | |
* Note that many themes and plugins hook into login_redirect. | |
* Whichever hook has the highest priority will be the last call | |
* on where to redirect. The priority below is set to 20. | |
* Note also that some URLs/pages may note be "posts" | |
* and may not have an ID we can track. | |
* Note also that some pages are excluded. You may want to exclude other pages. | |
* Note also that this may override any specific redirect_to passed in |
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 | |
/* | |
Payment/Subscription Transaction IDs Code | |
Add to your active theme's functions.php or a custom plugin. | |
*/ | |
//Add Transaction IDs to Members List | |
function tids_pmpro_memberslist_extra_cols_header($theusers) | |
{ | |
?> |
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
/** | |
* Forward PMPro PayPal IPNs to another domain. | |
* Each domain will process the IPNs. The IPN handlers should be setup to ignore | |
* messages that aren't for that site. PMPro does this. | |
* This is useful if you have 2 different sites using the same PayPal account | |
* and the IPN is setup to go to a PMPro site. | |
* Add this to a custom plugin on the PMPro site the IPN hits. | |
* Update the domain/url to the IPN you want to forward to. | |
* The pmprodev_gateway_debug_setup check makes sure this DOESN'T run if you have the | |
* PMPro Toolkit plugin enabled, i.e. you are on a staging site. |
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
# Copy page restrictions from parent page to child pages. | |
# NOTE that this doesn't delete any existing restrictions for the child pages. | |
INSERT IGNORE INTO wp_pmpro_memberships_pages (membership_id, page_id) | |
SELECT mp.membership_id, p.ID | |
FROM wp_posts p | |
LEFT JOIN wp_pmpro_memberships_pages mp ON p.post_parent = mp.page_id | |
WHERE mp.membership_id IS NOT NULL | |
AND p.post_type IN ( 'page' ) | |
AND p.post_parent = 123; -- Change the p.post_parent here to match the parent 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
# Copy page restrictions from parent pages to child pages. | |
# NOTE that this doesn't delete any existing restrictions for the child pages. | |
INSERT IGNORE INTO wp_pmpro_memberships_pages (membership_id, page_id) | |
SELECT mp.membership_id, p.ID | |
FROM wp_posts p | |
LEFT JOIN wp_pmpro_memberships_pages mp ON p.post_parent = mp.page_id | |
WHERE mp.membership_id IS NOT NULL | |
AND p.post_type IN ( 'page' ) | |
AND p.post_parent <> p.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 | |
/** | |
* 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/ | |
*/ | |
function my_pmpro_registration_checks_restrict_email_addresses( $value ) { | |
$email = $_REQUEST['bemail']; |
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
# Windows image file caches | |
Thumbs.db | |
ehthumbs.db | |
# Folder config file | |
Desktop.ini | |
# Recycle Bin used on file shares | |
$RECYCLE.BIN/ |
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
# Items to ignore when downloading a zip | |
.babelrc export-ignore | |
.editorconfig export-ignore | |
.gitattributes export-ignore | |
.gitignore export-ignore | |
package-lock.json export-ignore | |
package.json export-ignore | |
webpack.config.js export-ignore |