Skip to content

Instantly share code, notes, and snippets.

Avatar

Theuns Coetzee ipokkel

View GitHub Profile
View my_init_unique_key_and_email_as_username.php
<?php // Do not copy this tag
// Use unique membership key combined with the email address as username with PMPro checkout. You'll also have to hide the username fields at checkout using CSS or a custom checkout page template.
// Paste the code below into a PMPro Customization Plugin: https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
function my_init_unique_key_and_email_as_username()
{
$args = array(
'role' => 'author', // authors only
'orderby' => 'registered', // registered date
'order' => 'DESC', // last registered goes first
@ipokkel
ipokkel / my_init_unique_key_as_username.php
Created Mar 1, 2019
Use unique membership key as username with PMPro checkout
View my_init_unique_key_as_username.php
<?php // Do not copy this tag
// Use unique membership key as username with PMPro checkout. You'll also have to hide the username fields at checkout using CSS or a custom checkout page template.
// Paste the code below into a PMPro Customization Plugin: https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
function my_init_unique_key_as_username()
{
$args = array(
'role' => 'author', // authors only
'orderby' => 'registered', // registered date
@ipokkel
ipokkel / my_init_unique_key_as_username.php
Last active Mar 4, 2019
Use unique membership key as username with PMPro checkout.
View my_init_unique_key_as_username.php
<?php // Do not copy this tag
// Use unique membership key as username with PMPro checkout. You'll also have to hide the username fields at checkout using CSS or a custom checkout page template.
// Paste the code below into a PMPro Customization Plugin: https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
function salted_md5($encrypt_string) {
// If no string is passed create one from timestamp
if ( !$encrypt_string )
$encrypt_string = rand(10000,99999);
@ipokkel
ipokkel / pmpro-customizations-register-helper-example.php
Last active Mar 4, 2019
Paid Memberships Pro Register Helper: Add t-shirt sizes as selection
View pmpro-customizations-register-helper-example.php
<?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
*/
@ipokkel
ipokkel / pmpro-customizations-register-helper-example.php
Created Mar 4, 2019
Paid Memberships Pro Register Helper: Add license number and full name
View pmpro-customizations-register-helper-example.php
<?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
*/
@ipokkel
ipokkel / pmpro-customizations-register-helper-example.php
Last active Mar 6, 2019
Paid Memberships Pro Register Helper: Add t-shirt sizes as selection
View pmpro-customizations-register-helper-example.php
<?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
*/
@ipokkel
ipokkel / pmpro-customizations-rh-state-city-phone.php
Created Mar 13, 2019
Example for adding State, City and Phone number fields using the PMPro Customizations plugin
View pmpro-customizations-rh-state-city-phone.php
<?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
*/
@ipokkel
ipokkel / load-my-script-pmpro.php
Created Mar 13, 2019 — forked from andrewlimaza/load-my-script-pmpro.php
Load content on confirmation or checkout page for PMPro.
View load-my-script-pmpro.php
<?php
/**
* Load content for specific pages, checkout or confirmation page
* Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function load_my_script_for_pmpro() {
global $pmpro_pages;
if ( is_page( $pmpro_pages['checkout'] ) || is_page( $pmpro_pages['confirmation'] ) ) {
@ipokkel
ipokkel / pmro-customization-login-url-example.php
Created Mar 13, 2019
Change login url in WordPress emails.
View pmro-customization-login-url-example.php
<?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
*/
//Now start placing your customization code below this line
@ipokkel
ipokkel / pmpro-customizations_add_member_billing_shipping.php
Last active Mar 18, 2019
Paid Memberships Pro Customization add billing and shipping fields to Add Member from Admin
View pmpro-customizations_add_member_billing_shipping.php
<?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
*/
You can’t perform that action at this time.