Skip to content

Instantly share code, notes, and snippets.

View eighty20results's full-sized avatar

Thomas Sjølshagen eighty20results

View GitHub Profile
@eighty20results
eighty20results / pmpro-acto-rh-fields.php
Last active May 25, 2016 23:13
Register Helper fields (customization plugin) for ACTO Online
<?php
/*
Plugin Name: Additional user data for ACTO checkout
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/
Description: Add Register Helper fields to ACTO chekout & profile pages
Version: .1
Author: Stranger Studios
Author URI: http://www.strangerstudios.com
*/
@eighty20results
eighty20results / allow-fqdn-to-signup.php
Last active May 26, 2016 23:54
Check whether the new member has an email address that matches the specified domain and the level they're trying to sign up for is a free level.
<?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 "allow" list for registration
Version: .1
Author: Thomas Sjolshagen @ Stranger Studios <thomas@eighty20results.com>
Author URI: http://www.eighty20results.com/thomas-sjolshagen/
*/
@eighty20results
eighty20results / pmpro-bulk-update.php
Last active May 31, 2016 15:17
Proof of Concept for bulk-updating posts with membership protection (if the post didn't previously have protection)
<?php
/*
Plugin Name: PMPro Bulk Update
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/
Description: Allow updating all posts to a membership level
Version: .1
Author: Thomas Sjolshage <thomas@eighty20results.com>
Author URI: http://www.eighty20results.com/thomas-sjolshagen/
*/
@eighty20results
eighty20results / pmpro-apply-addon-access-to-all-child-pages.php
Created March 26, 2016 21:54
Protect all child pages of a page protected by the "Protect Add-on Pages" add-on
<?php
/*
Plugin Name: PMPro Protect Child Pages
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/
Description: Apply protection to all child pages of a Add-on Page that's protected.
Version: .1
Author: Thomas Sjolshagen @ Stranger Studios <thomas@eighty20results.com>
Author URI: https://eighty20results.com/thomas-sjolshagen/
*/
/**
@eighty20results
eighty20results / pmpro-single-use-trial.php
Created June 12, 2016 13:27
Configure one or more membership level(s) as "single-use" trial memberships (i.e. prevent the user from signing up more than once)
<?php
/*
Plugin Name: PMPro Single Use Trial Memberships
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/
Description: Allow a member to sign up for the trial membership level once
Version: .1
Author: Thomas Sjolshagen @ Stranger Studios <thomas@eighty20results.com>
Author URI: http://www.eighty20results.com/thomas-sjolshagen/
*/
@eighty20results
eighty20results / discounts.php
Last active July 12, 2016 21:19
Add discount code column to order list
function my_pmpro_add_cols_header($order_ids) {
ob_start(); ?>
<th>Discount Code</th><?php
return ob_get_clean();
}
add_filter('pmpro_orders_extra_cols_header', 'my_pmpro_add_cols_header');
function my_pmpro_add_cols_body($order) {
@eighty20results
eighty20results / pmpro-single-use-trial.php
Last active September 3, 2016 13:43
One time use trial membership level(s). Has filter `pmprosut_set_trial_level_ids` to configure which membership levels to make into one-time trial memberships
<?php
/*
Plugin Name: PMPro Single Use Trial Memberships
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/
Description: Allow a member to sign up for the trial membership level once
Version: .2
Author: Thomas Sjolshagen @ Stranger Studios <thomas@eighty20results.com>
Author URI: http://www.eighty20results.com/thomas-sjolshagen/
*/
@eighty20results
eighty20results / pmpro-set-default-country.php
Created September 9, 2016 17:41
Configure International addresses & set a non-US default country
<?php
/*
Plugin Name: PMPro: Set Default Country for Billing Page
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/
Description: Configure International addresses & set a non-US default country
Version: 1.0
Requires: 4.0
Author: Thomas Sjolshagen @ Paid Memberships Pro <thomas@eighty20results.com>
Author URI: http://www.eighty20results.com/thomas-sjolshagen/
License: GPL2
@eighty20results
eighty20results / jb-custom-pmpro-membership-number.php
Created November 11, 2016 15:13
Custom PMPro Membership Number for @jacobeels
<?php
/*
Member Numbers
* Change the generate_member_number function if your member number needs to be in a certain format.
* Member numbers are generated when users are registered or when the membership account page is accessed for the first time.
*/
//Generate member_number when a user is registered.
function generate_member_number($user_id)
{
@eighty20results
eighty20results / pmpro_multi_payment_options.php
Last active November 18, 2016 14:30 — forked from strangerstudios/my_init_pmpro_payment_options.php
Get PMPro Pay By Check and PMPro Add PayPal Express to work together.
/*
Plugin Name: Paid Memberships Pro - Pay By Check and PayPal Express at checkout
Plugin URI: http://eighty20results.com/paid-memberships-pro/do-it-for-me/
Description: More gracefully handle Pay By Check and PayPal Express as payment options during checkout
Version: 1.0
Author: Thomas Sjoslhagen @ Paid Memberships Pro <thomas@eighty20results.com>
Author URI: http://eighty20results.com/thomas-sjolshagen
*/
/*
Get PMPro Pay By Check and PMPro Add PayPal Express to work together.