Skip to content

Instantly share code, notes, and snippets.

View kimwhite's full-sized avatar

Kim White kimwhite

View GitHub Profile
@kimwhite
kimwhite / pmpro-change-your-level-text.php
Created October 10, 2023 16:01 — forked from ipokkel/pmpro-change-your-level-text.php
Replace "Your Level" with a custom text string using the Gettext filter.
<?php
/**
* This recipe will change the text Level or Levels to your preferred text.
*
* 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 / gettext-multiple-memberships-per-user.php
Created September 13, 2023 18:27 — forked from ipokkel/gettext-multiple-memberships-per-user.php
Change or translate text strings for PMPro Multiple Memberships Per User.
<?php
/**
* Change or translate text strings for PMPro Multiple Memberships Per User.
*
* This recipe assumes and requires that both PMPro core and PMPro Multiple Memberships Per User are active.
*
* 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_pmpro_country_tax.php
Last active September 8, 2023 16:15 — forked from dwanjuki/my_pmpro_uk_tax.php
Adds % tax to all levels if billing address is in the set country
<?php
/**
* Adds % tax to level 2 if billing address is in the set country.
*
* 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/
*/
function my_pmpro_country_tax( $tax, $values, $order ) {
<?php
/**
* This recipe will return a custom field when scanning a QR code. (diverlogno)
*
* Set your shortcode to [pmpro_membership_card qr_code='true' qr_data='other']
* for this filter to take effect.
*
* 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 / my_pmpro_member_links_top.php
Last active September 5, 2023 19:57 — forked from strangerstudios/my_pmpro_member_links_top.php
Add Link to the Paid Memberships Pro Membership Account Page.
@kimwhite
kimwhite / add_billing_shipping_fields_to_profile_and_add_member.php
Last active October 20, 2023 10:32 — forked from kimcoleman/add_billing_shipping_fields_to_profile_and_add_member.php
Adds Billing Address and Shipping Address (via the Shipping Add On) to the Edit User profile, frontend Member Profile Edit, and the Add Member Admin page.
<?php
/*
* Adds Billing Address and Shipping Address (via the Shipping Add On) to the Edit User profile,
* frontend Member Profile Edit, and the 'Add Member' page in the WordPress admin.
*
* 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 geocode existing member locations. Add /?pmpromm_process=true
* to run this script from /wp-admin/
*
* 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 use custom billing fields and geocode them instead of default
* fields during the checkout process.
*
* Check for the $_REQUEST variable first before checking for the stored user meta.
*
* 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 / lock-down-user-fields-for-subscribers.php
Last active August 18, 2025 16:22 — forked from ipokkel/lock-down-first-and-last-name.php
Make custom User Fields read-only for registered members #pmpro
<?php
/**
* Change PMPro User Field type based on user role.
*
* This code allows admin users to edit fields that appear as readonly for other users.
*
* title: Change PMPro User Field Type by Role
* collection: user-fields
* category: custom-fields
*
@kimwhite
kimwhite / my-pmprorh-extra-fields-admin-email.php
Last active June 27, 2023 17:16 — forked from ipokkel/my-pmprorh-extra-fields-admin-email.php
Add Register Helper fields to the admin checkout notification email.
<?php
/**
* Add User Fields and their values to the Admin Checkout Notification Email.
*
* 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/
*/