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 example is to show you the 'niche' options each Paid Memberships Pro - Register Helper Add-on field can take and how to use it. | |
* For more information on the Register Helper Add-on please visit https://www.paidmembershipspro.com/add-ons/free-add-ons/pmpro-register-helper-add-checkout-and-profile-fields/ | |
**/ | |
function my_pmprorh_init() | |
{ | |
//don't break if Register Helper is not loaded |
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 will add billing fields to Add Member from Admin and the user profile edit pages. | |
* | |
* Optional: Set if fields should be required | |
* | |
* Requires Paid Memberships Pro and PMPro Register Helper plugins 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. |
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 my_pmprorh_init() | |
{ | |
//don't break if Register Helper is not loaded | |
if(!function_exists("pmprorh_add_registration_field")) | |
{ | |
return false; | |
} | |
//define the fields | |
$fields = array(); | |
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 | |
// Show the custom Register Helper Fields in a different location if the user is logged in. | |
function my_pmprorh_init() | |
{ | |
//don't break if Register Helper is not loaded | |
if(!function_exists( 'pmprorh_add_registration_field' )) { | |
return 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 | |
function my_pmprorh_init() { | |
//don't break if Register Helper is not loaded | |
if(!function_exists( 'pmprorh_add_registration_field' )) { | |
return false; | |
} | |
//define the fields | |
$fields = array(); |
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_rand_directory($sqlQuery, $levels, $s, $pn, $limit, $start, $end, $order_by, $order) { | |
/** | |
* OPTIONS | |
*/ | |
// Ternary: Set to 1 to sort by membership id or 0 to sort by membership name | |
$level_sort_by = 0 ? 'mu.membership_id' : 'm.name'; |
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, copy from below this line | |
/* | |
Tell PMPro to filter the_content a bit later. | |
This will sometimes fix issues where theme or plugin elements (e.g. videos) | |
are not being filtered by PMPro. Note that this sometimes will cause | |
some things (e.g. share links) to be filtered that you don't want to be | |
filtered... and sometimes edits to the theme or a child theme are | |
required to get the desired effect. |
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 | |
/* | |
Define the global array below for your main accounts and sponsored levels. | |
Array keys should be the main account level. | |
*/ | |
global $pmprosm_sponsored_account_levels; | |
$pmprosm_sponsored_account_levels = array( | |
//set 3 seats for level 8 at level 2 checkout | |
2 => array( //id # of parent level |
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, copy from below this line | |
/* | |
Tell PMPro to filter the_content a bit later. | |
This will sometimes fix issues where theme or plugin elements (e.g. videos) | |
are not being filtered by PMPro. Note that this sometimes will cause | |
some things (e.g. share links) to be filtered that you don't want to be | |
filtered... and sometimes edits to the theme or a child theme are | |
required to get the desired effect. |
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 Customizations | |
Plugin URI: https://www.paidmembershipspro.com/wp/pmpro-customizations/ | |
Description: Customizations for my Paid Memberships Pro Setup | |
Version: .1 | |
Author: Paid Memberships Pro | |
Author URI: https://www.paidmembershipspro.com | |
*/ |