Skip to content

Instantly share code, notes, and snippets.

View kimwhite's full-sized avatar

Kim White kimwhite

View GitHub Profile
@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.
@kimwhite
kimwhite / my_pmpro_member_links.php
Created March 22, 2023 18:27 — forked from kimcoleman/my_pmpro_member_links.php
Example of how to add links to the Member Links list on the Membership Account page.
@kimwhite
kimwhite / pmpro_changeMembershipLevel.php
Last active March 13, 2023 15:26 — forked from femiyb/pmpro_changeMembershipLevel.php
When users cancel (are changed to membership level 0) we give them another "cancelled" level.
<?php
/**
* When users cancel (are changed to membership level 0) we give them another "cancelled" level.
* Can be used to downgrade someone to a free level when they cancel.
* Will allow members to the "cancel level" to cancel from that though.
*/
function pmpro_after_expiration_change_membership_levels( $level_id, $user_id ) {
// set this to the id of the level you want to give members when they cancel
$last_level_tohave = 5;
$level_togive_cancel_id = 6;
@kimwhite
kimwhite / my-pmproio-codes-uses-per-level.php
Last active February 22, 2023 13:14 — forked from ipokkel/my-pmproio-codes-per-level.php
Experimental code to change number of invite codes uses per level.
<?php
/**
* This is an experimental workaround for PMPro Invite Only
* to assign a different number of invite codes depending on
* the level a user checks out for.
*
* This experimental code has not be thoroughly tested and is
* considered as a "use-at-your-own-risk" code snippet that
* is NOT suitable for a live/production environment.
*
@kimwhite
kimwhite / change-email-tet-for-pmpro-approvals.php
Last active February 15, 2023 19:51 — forked from ipokkel/change-email-tet-for-pmpro-approvals.php
Change the account is now pending text string in emails for the PMPro Approvals Add On
<?php
/**
* Change localized text strings for Paid Memberships Pro Approvals Add On
* using the WordPress 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/
*/