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 cancellation to set expiration date et expiration date to be the end of the current month, instead of cancelling immediately. | |
Assumes orders are generated for each payment (i.e. your webhooks/etc are setup correctly). | |
*/ | |
function e20r_stripe_delete_action( $user_id ) { | |
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 | |
/* | |
Plugin Name: PMPro e-mail domain check | |
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/ | |
Description: Check if a domain is on the "do not allow" list for registration | |
Version: .1 | |
Author: Stranger Studios | |
Author URI: http://www.strangerstudios.com | |
*/ |
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 | |
/* | |
Plugin Name: PMPro Custom Admin Page | |
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/ | |
Description: Templated admin pages for Paid Memberships Pro | |
Version: .1 | |
Author: Stranger Studios | |
Author URI: http://www.strangerstudios.com | |
*/ |
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 | |
/* | |
* Hide some levels from Levels page | |
*/ | |
function my_pmpro_levels_array($levels) { | |
global $current_user; | |
// if the user is logged in | |
if (!empty($current_user->ID)) |
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
function pmpro_loadTemplate($page_name = null, $type = 'pages', $ext = 'php' ) | |
{ | |
// called from page handler shortcode | |
if (is_null($page_name)) | |
{ | |
global $pmpro_page_name; | |
$page_name = $pmpro_page_name; | |
} | |
// template paths in order of priority (array gets reversed) |
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 | |
function restrict_email($value) | |
{ | |
$email = $_REQUEST['bemail']; | |
if(is_invalid($email)) | |
{ | |
global $pmpro_msg, $pmpro_msgt; | |
//TODO: Set the error text to be whatever you want it to be: |
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 | |
/* | |
Add birthday to user signup and check that user is between 13-17. | |
Will not work with PayPal Standard or PayPal Express. | |
*/ | |
//birthday fields | |
function my_pmpro_checkout_after_user_fields() | |
{ | |
$current_day = date("j"); |
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 | |
/* | |
Plugin Name: Additional Checkout Fields (PMPro Register Helper) | |
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/ | |
Description: Additional Checkout page & profile fields for the Paid Memberships Pro Register Helper add-on | |
Version: .1 | |
Author: Thomas Sjolshagen @ Stranger Studios <[email protected]> | |
Author URI: http://www.strangerstudios.com | |
*/ | |
function my_add_pmpro_RH_fields() |
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 | |
/* | |
Plugin Name: Additional Checkout Fields (PMPro Register Helper) | |
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/ | |
Description: Additional Checkout page & profile fields for the Paid Memberships Pro Register Helper add-on | |
Version: .1 | |
Author: Thomas Sjolshagen @ Stranger Studios <[email protected]> | |
Author URI: http://www.strangerstudios.com | |
*/ | |
function my_add_pmpro_RH_fields() |
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 | |
function my_add_pmpro_RH_fields() | |
{ | |
//require PMPro and PMPro Register Helper | |
if (!defined('PMPRO_VERSION') || !defined('PMPRORH_VERSION')) | |
return; | |
$fields = array(); | |
$fields[] = new PMProRH_Field( | |
"first_name", // Input name, will also be used as the key to access as user meta |