Skip to content

Instantly share code, notes, and snippets.

View kimwhite's full-sized avatar

Kim White kimwhite

View GitHub Profile
@kimwhite
kimwhite / font-awesome-icons-for-member-directory-and-profile-pages.php
Last active February 19, 2024 12:54 — forked from ipokkel/font-awesome-icons-for-member-directory-and-profile-pages.php
Add a Fontawesome 5 icon before a URL link on the PMPro Member Directory and Profile pages.
<?php
/**
* This recipe adds a Fontawesome 5 icon before a custom field containing
* a URL on the Member Directory and Profile pages.
*
* This recipe assumes that Fontawesome 5 support is made available either
* via the active theme or a plugin.
*
* WordPress auto-embeds feeds from certain oEmbed providers, e.g. Twitter.
* https://wordpress.org/support/article/embeds/
@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-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.