Skip to content

Instantly share code, notes, and snippets.

View dwanjuki's full-sized avatar

David Wanjuki dwanjuki

  • Nairobi, Kenya
  • 02:10 (UTC +03:00)
View GitHub Profile
@dwanjuki
dwanjuki / my_pmpro_is_level_expiring_soon.php
Last active August 4, 2025 11:14 — forked from andrewlimaza/disable_double_checkout.php
Do not allow membership renewal unless the level is expiring in the next 45 days.
<?php
/**
* Do not allow membership renewal unless the level is expiring in the next 45 days.
*
* 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/
*/
@dwanjuki
dwanjuki / move-pmpro-content-higher.php
Last active July 31, 2025 09:59 — forked from andrewlimaza/move-pmpro-content-higher.php
Move the content restricted message higher up the course content for LifterLMS
<?php
/**
* Move the Paid Memberships Pro content restricted message higher up in LifterLMS course content.
* This requires "Course Information" block to be on the page and shown before this using jQuery.
* Tweak this jQuery code to fit your needs and move the content higher up.
*
* To add the code to your site you may follow this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_move_pmpro_div_with_jquery_llms() {
@dwanjuki
dwanjuki / last_payment_date_members_list.php
Last active July 14, 2025 08:25 — forked from dparker1005/next_last_payment_dates_members_list.php
Adds last payment date to the members list and export CSV in Paid Memberships Pro (PMPro).
<?php
/**
* Adds last payment date to the members list and export CSV.
*
* 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/
*/
@dwanjuki
dwanjuki / my_first_last_display_name.php
Last active June 25, 2025 09:32 — forked from kimcoleman/my_first_last_display_name.php
Set Display Name on Membership Checkout and for BuddyPress Nickname field.
<?php
/**
* Set Display Name on Membership Checkout and for BuddyPress Nickname field.
*
* 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_first_last_display_name( $user_id ) {
@dwanjuki
dwanjuki / my_pmpro_email_expiration.php
Last active June 6, 2025 13:12 — forked from andrewlimaza/my_pmpro_email_expiration.php
Change when the expiration email is sent out for PMPro
<?php
/**
* Change when the expiration email get's sent out to users.
*
* 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/
*/
@dwanjuki
dwanjuki / my-pmpromd-display-element-html.php
Last active June 9, 2025 11:27 — forked from ipokkel/my-pmpromd-display-element-html.php
Allow some HTML tags when displaying textarea fields on the member directory
<?php
/**
* Allow some HTML tags when displaying textarea fields on the member directory.
*
* 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_pmpromd_display_element_html( $value, $element, $pu, $displayed_levels ) {
<?php // copy from below
/**
* Disable the PMPro default expiration warning 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/
*/
@dwanjuki
dwanjuki / default-checkout-level.php
Last active June 3, 2025 15:47 — forked from andrewlimaza/default-checkout-level.php
Default checkout level if no level parameter
<?php
/**
* Set default checkout level if none is specified.
*
* 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/
*/
@dwanjuki
dwanjuki / my_wp_change_password_hint.php
Last active June 3, 2025 15:11 — forked from andrewlimaza/change-wp-password-hint.php
Change WordPress Password Hint Text
<?php
/**
* Change the WordPress password hint 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/
*/
@dwanjuki
dwanjuki / disable_gravity_forms_recaptcha_on_pmpro_checkout.php
Last active May 14, 2025 10:20 — forked from ipokkel/disable-cf7-recaptcha.php
Disable Gravity Form's reCAPTCHA on the checkout page for PMPro
<?php
/**
* This recipe stops Gravity Form's recaptcha javascript from loading
* on the PMPro checkout page. This helps prevent conflicts from recaptcha
* being loaded twice.
*
* 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/