Skip to content

Instantly share code, notes, and snippets.

View dwanjuki's full-sized avatar

David Wanjuki dwanjuki

  • Nairobi, Kenya
  • 15:46 (UTC +03:00)
View GitHub Profile
@dwanjuki
dwanjuki / my_pmproz_after_change_membership_level_data.php
Created May 26, 2025 10:46
Add cancelled level's ID to Changed Membership Level trigger data if a membership is being cancelled
<?php
/**
* Add cancelled level's ID to Changed Membership Level trigger data
* if a membership is being cancelled
*
* 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_gift_purchaser_login_redirect.php
Last active May 14, 2025 12:25
Redirect users with Gift Purchases to the Membership Account page on login
<?php
/**
* Redirect users with Gift Purchases to the Membership Account page on login
* if no redirect has been set via the redirect_to URL parameter
*
* 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/
@dwanjuki
dwanjuki / my_pmpro_show_comment_count_after_restricted_post.php
Last active April 24, 2025 07:50
Display comment count on restricted posts for visitors without access
<?php
/**
* Display comment count on restricted posts for visitors without access
*
* 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_show_comment_count_after_restricted_post( $no_access_message_html ) {
@dwanjuki
dwanjuki / my_pmpro_tax_agst.php
Created April 8, 2025 14:03
Apply 10% tax (GST) if Billing Address is in Australia
<?php
/**
* Apply 10% tax if Billing Address is in Australia
*
* Requires Billing Address fields on checkout 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_pmpromd_allowed_html.php
Last active April 24, 2025 13:40
Add source tag and its src and type attributes to Member Directory allowed HTML
<?php
/**
* Add source tag and its src and type attributes to Member Directory allowed HTML
*
* Resolves issue with audio and video not playing
*
* 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_hide_group_field_on_ap_checkout.php
Created April 7, 2025 08:37
Hide Group Accounts field on Addon Package Checkout pages
<?php
/**
* Hide Group Accounts field on Addon Package Checkout pages
*
* 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_hide_group_field_on_ap_checkout() {
@dwanjuki
dwanjuki / my_pmpro_bcc_membership_expired_email.php
Last active April 4, 2025 15:14 — forked from kimwhite/my_pmpro_email_headers_admin_emails.php
This recipe will BCC additional email addresses when a member expired
<?php // do not copy this line.
/**
* This recipe will BCC additional email addresses when a member expired
*
* 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_tribe_events_archive_require_membership.php
Created April 4, 2025 11:55
Redirect visitors without membership access form the The Events Calendar archive page
<?php
/**
* Redirect visitors without membership access form the The Events Calendar archive 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 / change-text-for-addon-package-checkout.php
Created April 4, 2025 08:14 — forked from ipokkel/change-text-for-addon-package-checkout.php
Change the text for the addon package checkout page to only show the post title and exclude the level name.
<?php
/**
* Change the text for the addon package checkout 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/
*/
// Swap the pmproap_pmpro_checkout_level filter with our custom one.