Skip to content

Instantly share code, notes, and snippets.

View kimwhite's full-sized avatar

Kim White kimwhite

View GitHub Profile
@kimwhite
kimwhite / pmpro-group-discount-order-csv-export.php
Created August 27, 2021 13:27 — forked from greathmaster/pmpro-group-discount-order-csv-export.php
Add the group code column to the Order CSV export
<?php
//Add the group code column to the Order CSV export
//Set up the column header and callback function
function my_pmpro_orders_csv_extra_columns($columns)
{
$columns["group_code"] = "my_extra_order_column_notes";
return $columns;
}
@kimwhite
kimwhite / my_pmprorh_init.php
Last active August 24, 2021 17:03 — forked from ipokkel/my_pmprorh_init.php
Sample RH custom fields
<?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
*/
@kimwhite
kimwhite / my_pmpro_members_list_sql.php
Last active August 24, 2021 12:28 — forked from strangerstudios/my_pmpro_members_list_sql.php
Add ability to search on specific user and user meta fields to the PMPro members list page.
<?php // This is a fork that ensures results will export
/*
Add ability to search on specific user and user meta fields
in the members list page.
e.g. last_name:coleman will search for users with last_name LIKE %coleman%
Some common PMPro-related user and user meta fields:
* first_name, last_name, user_login
* pmpro_bfirstname, pmpro_blastname, pmpro_baddress1, pmpro_bcity, pmpro_bstate, pmpro_bcountry, pmpro_bphone
@kimwhite
kimwhite / my_pmpro_add_name_checkout_hints.php
Last active August 20, 2021 13:44 — forked from dparker1005/my_pmpro_add_name_checkout_hints.php
Adds a hint to the first and last name fields at checkout.
<?php // do not copy this line.
/**
* This recipe will let you add hints to default WordPress fields (also child sponsor fields)
*
* 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.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
<?php
/**
* This recipe will change the word 'seat' to 'account'
*
* 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.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
@kimwhite
kimwhite / my_pmprorh_init_user_avatar.php
Last active November 10, 2022 13:33 — forked from kimcoleman/my_pmprorh_init_user_avatar.php
Allow members to upload their avatar using a Register Helper field during checkout or on the Member Profile Edit page.
<?php
/*
* Allow members to upload their avatar using a Register Helper field during checkout or on the Member Profile Edit page.
*
* Requires: Paid Memberships Pro, (Register Helper Add On for PMPro versions before 2.8)
*
* 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.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
@kimwhite
kimwhite / change-add-first-last-name-to-checkout.php
Last active July 26, 2021 19:01 — forked from ipokkel/change-add-first-last-name-to-checkout.php
Change text or translate Add Name to Checkout Add On #pmpro-add-name-to-checkout
<?php
/**
* This recipe changes localized text strings for
* Add Member from Admin using the gettext filter.
*
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
*
* 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.
* Read this companion article for step-by-step directions on either method.
@kimwhite
kimwhite / change-add-paypal-express.php
Last active March 20, 2025 06:07 — forked from ipokkel/change-add-paypal-express.php
Change text for add paypal express to checkout translation strings
<?php
// Add this code below to your PMPro Customizations plugin - http://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
add_filter( 'gettext', 'change_text_for_add_paypal_express', 20, 3 );
/**
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
*/
function change_text_for_add_paypal_express( $translated, $text, $domain ) {
switch ( $domain ) {
case 'pmpro-add-paypal-express':
switch ( $text ) {
@kimwhite
kimwhite / require_level.php
Last active July 16, 2021 05:48 — forked from andrewlimaza/require_level.php
require level before signing up.
<?
/*
Require a certain level before registering for another level.
Add this code to your active theme's functions.php or
a custom plugin.
*/
function my_pmpro_registration_checks($okay)
{
//only check if things are okay so far
if($okay)
@kimwhite
kimwhite / pmpro-user-page-content-filter.php
Last active July 8, 2021 17:19 — forked from strangerstudios/pmpro-user-page-content-filter.php
Use a filter to adjust the content of the user page that is created with PMPro and the User Pages addon.
<?php // do not copy this line.
/**
* When the user page is created, add some content. Add default content by Level.
*
* 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.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/