Skip to content

Instantly share code, notes, and snippets.

View kimwhite's full-sized avatar

Kim White kimwhite

View GitHub Profile
@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-first-and-last-name.php
Last active July 19, 2023 12:18 — forked from ipokkel/lock-down-first-and-last-name.php
Make First Name and Last Name read-only for registered members #pmpro
<?php
/**
* This recipe assigns the readonly attribute to the fields
* first_name and last_name on the PMPro profile edit page
* on the front-end and the user profile page in the
* WordPress dashboard (back-end)
*
* 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-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/
*/
@kimwhite
kimwhite / default_new_posts_to_level1.php
Last active June 7, 2023 16:49 — forked from strangerstudios/default_new_posts_to_level1.php
Default new WP posts to require level 1 with Paid Memberships Pro.
<?php // do not copy this line.
/**
* This recipe does will Check to require level 1 by default (or whatever level you choose).
*
* 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 / custom_addon_package_prices.php
Last active June 6, 2023 15:41 — forked from strangerstudios/custom_addon_package_prices.php
Charge different prices for different membership levels with PMPro and PMPro Addon Packages.
<?php // do not copy this line.
/**
* This recipe Adds different prices for different membership levels.
* For use with with Addon Package Add On https://www.paidmembershipspro.com/add-ons/pmpro-purchase-access-to-a-single-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/
*/
@kimwhite
kimwhite / change-text-member-directory.php
Last active May 31, 2023 15:00 — forked from ipokkel/change-text-member-directory.php
Change or translate text for PMPro Member Directory and Profile with gettext. #pmpro-member-directory
<?php
/**
* This recipe is an example of how to change localized text strings
* for PMPro Member Directory 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 / customize-change-link.php
Last active April 3, 2023 12:54 — forked from ipokkel/customize-change-link.php
Change the "Renew" link to text and link on the Membership Account page under My Memberships.
<?php // do not copy this line.
/**
* This recipe does will check to to make sure an email address is not used for the username.
* Please be aware this is a "use-at-own-risk" option.
* If assistance with the implementation or further customizations is required you
* may reach out to a local WordPress developer
*
* 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.