Skip to content

Instantly share code, notes, and snippets.

View kimwhite's full-sized avatar

Kim White kimwhite

View GitHub Profile
<?php
/*
Add birthday (month and day only) to user signup.
*/
// Add birthday fields at checkout.
function my_pmpro_birthday_checkout_after_email() {
$current_year = date("Y");
?>
<div>
@kimwhite
kimwhite / pmpro-require-strong-password-minimum-strength.php
Last active October 13, 2025 11:21 — forked from ipokkel/pmpro-require-strong-password-minimum-strength.php
increase the minimum password strength required during membership checkout or signup
<?php
/**
* Require a Stronger Password Score for Member Registration
*
* This recipe works with the PMPro Require Strong Passwords Add On to increase
* the minimum password strength required during membership checkout or signup.
*
*
* It also customizes the message shown to members when their password is rejected.
*
@kimwhite
kimwhite / pmpro-ipn-redirect.php
Last active September 24, 2025 14:08 — forked from andrewlimaza/pmpro-ipn-redirect.php
Post IPN data to multiple URLs example [Paid Memberships Pro]
<?php
/**
* Needs testing
* Forward PayPal IPN from WooCommerce to PMPro's IPN handler.
* Drop this into a custom plugin or your theme's functions.php.
*/
function my_pmpro_forward_ipn_from_woo() {
// Forward the raw POST data from Woo's IPN to PMPro.
<?php // do not copy this line.
/**
* Show member email address and WordPress User ID on Membership Card.
* Requires the Membership Card Add On
*
* 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 / unset-billing-address-fields.php
Last active September 12, 2025 13:11 — forked from MaryOJob/unset-billing-address-fields.php
Makes All billing Address Fields Not Required At checkout.
<?php // do not copy this line
/**
* This recipe makes all billing fields on the checkout page not required
* CSS is included to "hide" the field you don't want to show.
*
* Note: Make sure your Gateway doesn't require these 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.
<?php
/**
* This recipe will geocode existing member locations. Add /?pmpromm_process=true
* to run this script from /wp-admin/
*
* Change line 26 to increase batch sizes. Note that the Google Maps Geocode API
* has a daily limit of 2 000 requests.
*
* 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.
@kimwhite
kimwhite / cc-pmpro-admin-email-cancel.php
Last active August 28, 2025 16:07 — forked from andrewlimaza/cc-pmpro-admin-email-cancel.php
CC an email address on the 'cancel_admin' email PMPro sends out.
<?php
/**
* CC an email address on the 'cancel_admin' email PMPro sends out.
* Add this code to your site by following - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_email_headers_admin_cancel_emails($headers, $email) {
//cc emails already going to admin_email
if( $email->template == 'membership_recurring' ) {
//add cc
$headers[] = 'CC:' . '[email protected]'; // type in your email address here please.
<?php // do not copy this line.
/**
* This recipe changes term "membership" to "subscription" for plugin generated text Front End only
*
* 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 / minh-my_login_change_text_with_gettext.php
Last active August 20, 2025 14:56 — forked from JarrydLong/minh-my_login_change_text_with_gettext.php
Change / Translate login page text strings with the gettext filter
<?php // do not copy this line
/**
* This recipe changes login page text strings with the gettext filter
*
* 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_add_extra_expiration_warning_templates.php
Last active July 10, 2025 13:25 — forked from ideadude/my_add_extra_expiration_warning_templates.php
Send extra expiration warning emails with individual templates when using PMPro and the Extra Expiration Warning Emails add on.
<?php
/**
* Send extra expiration warning emails with individual templates.
* Make sure the Extra Expiration Warning Emails Add On is also active.
* https://www.paidmembershipspro.com/add-ons/extra-expiration-warning-emails-add-on/
*
* Then add this code into a custom plugin or code snippet.
* https://www.paidmembershipspro.com/how-to-add-code-to-wordpress/
*/
// Tell the expiration warnings add on to use our templates.