Skip to content

Instantly share code, notes, and snippets.

View kerijacoby's full-sized avatar

Keri Jacoby kerijacoby

View GitHub Profile
@kerijacoby
kerijacoby / my-pmpro-custom-fields.php
Last active October 27, 2022 19:50 — forked from kimwhite/my-pmpro-custom-fields.php
NRGSCapps Custom Registration Fields
<?php // do not copy this line.
/**
* This recipe creates custom fields for your PMPro checkout page.
*
* 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/
*/
@kerijacoby
kerijacoby / my_pmpro_prevent_renewal.php
Created November 16, 2022 17:34 — forked from dparker1005/my_pmpro_prevent_renewal.php
Remove 'Renew' link and prevent checkout if user already has membership level
<?php
// Copy from below here.
add_action('pmpro_is_level_expiring_soon', '__return_false', 10, 2);
// Prevent registration and display error message when checking out
// for level that the user already has.
function my_pmpro_prevent_renewal( $continue ) {