Skip to content

Instantly share code, notes, and snippets.

View dwanjuki's full-sized avatar

David Wanjuki dwanjuki

  • Nairobi, Kenya
  • 15:25 (UTC +03:00)
View GitHub Profile
@dwanjuki
dwanjuki / my_multiple_recovery_email_recipients.php
Created February 1, 2023 07:33
Send WordPress critical error notifications to multiple recipients
<?php
/**
* Set recipients for WP Recovery Mode emails
*
* 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_pmpro_email_renewaldate_data.php
Created February 1, 2023 15:44
This recipe makes the !!renewaldate!! variable available for use in all Paid Memberships Pro emails.
<?php
/**
* This recipe makes the !!renewaldate!! variable available for use in all Paid Memberships Pro emails.
* When the variable is empty it will display nothing instead of the !!renewaldate!! email variable
*
* Notice the array key does not include the !!s
*
* 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.
@dwanjuki
dwanjuki / my_send_email_after_validation.php
Last active February 2, 2023 13:13 — forked from andrewlimaza/send_custom_email.php
Send a custom email to user after the user's email is validated
<?php
/**
* Add this code to your PMPro Customizations Plugin - http://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
* This function below sends a custom HTML email to the user that checks out for a pmpro membership level, easily extendible to send to admins, or specific users and so on.
* Website: https://paidmembershipspro.com
*/
function my_send_email_after_validation( $user_id ){
@dwanjuki
dwanjuki / redirect_admin_activity_emails.php
Created February 7, 2023 09:36
Change Admin Activity emails recipient from Site Admin to the specified email address
<?php
/**
* The function below will change the recipient of Admin Activity Emails.
*
* 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_redirect_admin_activity_emails( $recipient, $email ) {
@dwanjuki
dwanjuki / buyer-seller-country-match-show-vat.php
Created February 9, 2023 06:44
Show VAT fields when buyer and seller countries match
<?php
/*
* Show VAT fields when buyer and seller countries match
*
* 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-pmpro-email-data.php
Last active February 9, 2023 07:32 — forked from ipokkel/my-pmpro-email-data.php
This recipe adds user fields as email variables that may be used in PMPro Email Templates.
<?php
/**
* This recipe adds a user field as an email variable !!your_field_name!! that may be used in PMPro Email Templates.
*
* 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 adds user fields to the invoice 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_pmpro_add_firstname_to_checkout.php
Created February 10, 2023 07:03
Add First Name field to checkout, after username
/**
* Add first_name field to checkout, after username
*
* 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_add_firstname_to_checkout() {
@dwanjuki
dwanjuki / my_pmpro_change_invalid_email_error_text.php
Created February 14, 2023 11:47
Change the PMPro invalid_email error message to something else
<?php
/*
* Change the PMPro invalid_email error 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 / my_pmpro_email_data_membership_level_name.php
Created February 20, 2023 09:47 — forked from ipokkel/my_pmpro_email_data_membership_level_name.php
Add !!membership_level_name!! for PMPro expired email template.
<?php
/**
* Add !!membership_level_name!! to Paid Memberships Pro expired email template.
*
* 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/
*/