Skip to content

Instantly share code, notes, and snippets.

Avatar

Thomas Sjolshagen eighty20results

View GitHub Profile
@eighty20results
eighty20results / oeis-substitution-variables.php
Last active Oct 25, 2018
Add custom member application fields as substitution variables for email messages from the OEIS Member Application Management
View oeis-substitution-variables.php
<?php
/*
Plugin Name: OEIS Member Application Management: Custom Substitution Variables
Plugin URI: https://eighty20results.com/paid-memberships-pro/do-it-for-me/
Description: Add custom, pre-defined Register Helper fields, as email substitution variables for the messages sent by the OEIS Member Application Management plugin
Version: 1.1
Requires at least: 4.9
Tested up to: 4.9.8
Author: Eighty / 20 Results by Wicked Strong Chicks, LLC <thomas@eighty20results.com>
Author URI: https://eighty20results.com/thomas-sjolshagen/
@eighty20results
eighty20results / pmpro_ld2aff.php
Last active Oct 23, 2018 — forked from strangerstudios/pmpro_ld2aff.php
Link Paid Memberships Pro discount codes to affiliate accounts from another plugin/service.
View pmpro_ld2aff.php
<?php
/*
Plugin Name: E20R - Link PMPro Discount Codes to Affiliate Accounts
Plugin URI: https://eighty20results.com/paid-memberships-pro/do-it-for-me/
Description: Link a PMPro Discount Code to the account of an affiliate
Version: 1.0
Requires at least: 4.5
Tested up to: 4.9.8
Author: Eighty / 20 Results by Wicked Strong Chicks, LLC <thomas@eighty20results.com>
Author URI: https://eighty20results.com/thomas-sjolshagen/
@eighty20results
eighty20results / bulk-update.sql
Created Sep 17, 2018
Bulk update membership levels in Paid Memberships Pro
View bulk-update.sql
UPDATE wp_pmpro_memberships_users SET 'membership_id' = 2 WHERE status = 'active' AND 'membership_id' = 1;
@eighty20results
eighty20results / uj-customizations.php
Created May 19, 2018
Custom fields per support topic
View uj-customizations.php
<?php
/*
Plugin Name: PMPro Customizations: Register Helper Fields
Plugin URI: https://eighty20results.com/paid-memberships-pro/do-it-for-me/
Description: Customizations - Register Helper Fields
Version: 1.0
Author: Eighty / 20 Results by Wicked Strong Chicks, LLC <thomas@eighty20results.com>
Author URI: https://eighty20results.com/thomas-sjolshagen/
License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
License: GPLv2 or later
@eighty20results
eighty20results / disable-paypalexpress-for-level.php
Created May 15, 2018
Removes the "Pay with PayPal Express" choice from the checkout page when the user uses one of the specified Membership Level IDs
View disable-paypalexpress-for-level.php
<?php
/*
Plugin Name: PMPro Customizations: Remove PayPal Express as payment option for Membership Level
Plugin URI: https://eighty20results.com/paid-memberships-pro/do-it-for-me/
Description: Removes PayPal Express as a payment option on the PMPro Checkout page when the user has selected a specific membership level.
Version: 1.0
Author: Eighty / 20 Results by Wicked Strong Chicks, LLC <thomas@eighty20results.com>
Author URI: https://eighty20results.com/thomas-sjolshagen/
License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
License: GPLv2 or later
@eighty20results
eighty20results / gh-custom-cancel-page
Created Apr 14, 2018
Load custom cancellation page for certain membership levels
View gh-custom-cancel-page
<?php
/**
* Filter handler for `pmpro_pages_shortcode_cancel` (load custom cancellation page for certain membeship levels)
*
* @param string $content
*
* @return string
*/
function gc_custom_cancel_page( $content ) {
@eighty20results
eighty20results / unique_line_items.php
Last active Nov 21, 2017
Add a new line item if the quantity of a product increases
View unique_line_items.php
function createUniqueLineItems( $cart_item_key, $product_id, $quantity, $variation_id, $variation, $cart_item_data ) {
// Only do this for quantities > 1
if ( $quantity > 1 ) {
// Reset the quantity for the current product entry
WC()->cart->set_quantity( $cart_item_key, 1 );
// Add a line-item for all quantities > 1. Already have one entry in the cart, so do it for $quantity - 1
for ( $i = 1; $i <= $quantity - 1; $i ++ ) {
@eighty20results
eighty20results / pmpro_cancelled_level.php
Last active Oct 23, 2018 — forked from strangerstudios/pmpro_cancelled_level.php
Place a PMPro member in another level when they cancel.
View pmpro_cancelled_level.php
<?php
/*
Plugin Name: Eighty/20 Results: Assign free level when cancelling
Plugin URI: https://eighty20results.com/paid-memberships-pro/do-it-for-me/
Description: Custom code to configure a default member level for a user who cancels
Version: 1.0
Requires at least: 4.5
Tested up to: 4.9.8
Author: Eighty / 20 Results by Wicked Strong Chicks, LLC <thomas@eighty20results.com>
Author URI: https://eighty20results.com/thomas-sjolshagen/
View wr_customizations.php
<?php
/*
Plugin Name: PMPro Customizations: Register Helper Fields
Plugin URI: https://eighty20results.com/paid-memberships-pro/do-it-for-me/
Description: Customizations - Register Helper Fields
Version: 1.0
Author: Eighty / 20 Results by Wicked Strong Chicks, LLC <thomas@eighty20results.com>
Author URI: https://eighty20results.com/thomas-sjolshagen/
License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
License: GPLv2 or later
@eighty20results
eighty20results / pmpro-canadian-tax-option.php
Last active Jan 16, 2018
Canadian Tax calculation for PMPro (HST, PST, TPS and TVQ rates)
View pmpro-canadian-tax-option.php
<?php
/*
Plugin Name: PMPro: Canadian Tax calculation
Plugin URI: https://eighty20resultsc.com/wordpress-plugins/
Description: PMPro Tax Calculation for (some of) the Canadian province(s)
Version: 1.4
Author: Thomas Sjolshagen @ Paid Memberships Pro <thomas@eighy20results.com>
Author URI: https://eighty20results.com/thomas-sjolshagen/
License: GPL2
You can’t perform that action at this time.