Skip to content

Instantly share code, notes, and snippets.

View dwanjuki's full-sized avatar

David Wanjuki dwanjuki

  • Nairobi, Kenya
  • 18:43 (UTC +03:00)
View GitHub Profile
@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 / remove_pmpro_membership_levels_table_on_profile.php
Created June 24, 2025 13:48
Remove the Membership Levels section from the WordPress Edit User admin page
<?php
/**
* Remove the Membership Levels section from the Edit User 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/
*/
@dwanjuki
dwanjuki / my_pmproeewe_buddyboss_suspended_members.php
Last active June 17, 2025 07:45
Stop Extra Expiration Warning Emails being sent for suspended BuddyBoss members
<?php
/*
* Stop Extra Expiration Warning Emails being sent for suspended BuddyBoss members.
*
* 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_pmproeewe_buddyboss_suspended_members( $send, $euser ) {
@dwanjuki
dwanjuki / my_pmprogroupacct_invite_link_add_invited_email.php
Created June 16, 2025 09:21
Add the invited person's email address to the Group Account invite link.
@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 ) {
@dwanjuki
dwanjuki / my_pmpro_stripe_checkout_params_send_user_data.php
Created June 5, 2025 09:54
Include subscription metadata in Stripe Checkout session parameters
<?php // copy from below
/**
* Include metadata in Stripe Checkout session params.
*
* 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 // 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/
*/