Skip to content

Instantly share code, notes, and snippets.

View dwanjuki's full-sized avatar

David Wanjuki dwanjuki

  • Nairobi, Kenya
  • 20:14 (UTC +03:00)
View GitHub Profile
@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_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 / 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.
<?php
/**
* This recipe will hide the discount code field on the checkout page if no discount codes
* have been created for that specific level, or if the current date is not between the
* exisiting discount codes' Start and Expiration dates
*
* 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_order_details_to_email.php
Last active May 2, 2025 16:38 — forked from andrewlimaza/add-invoice-details-to-email-pmpro.php
Add subtotal (!!invoice_subtotal!!) and tax (!!invoice_tax!!) variables to email templates
<?php // copy from below
/**
* Add !!invoice_subtotal!! and !!invoice_tax!! variables to email templates where an Order ID is available.
*
* 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_order_details_to_email( $data, $email ) {
@dwanjuki
dwanjuki / my_pmpro_show_hide_discount_code.php
Last active February 28, 2025 09:05 — forked from JarrydLong/mypmpro-hide-discount-field-specific-level.php
Show the discount code field on checkout for specified levels, hide on others
<?php
/**
* Show the discount code field on checkout for specific levels only
*
* 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 / add_excerpt_to_wordpress_page.php
Last active February 26, 2025 09:24 — forked from andrewlimaza/add_excerpt_to_wordpress_page.php
Add Excerpt Functionality To WordPress Pages
<?php
/**
* Add Excerpt Functionality To WordPress 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/
*/
@dwanjuki
dwanjuki / my_pmpro_confirmation_url.php
Last active January 15, 2025 13:22 — forked from strangerstudios/my_pmpro_confirmation_url.php
Example of using the pmpro_confirmation_url filter to change the PMPro confirmation page for new users.
<?php
/**
* Change the membership confirmation page for new members only
*
* 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_confirmation_url($url, $user_id, $level) {
@dwanjuki
dwanjuki / my_hide_arc_if_pbc_selected_script.php
Last active January 9, 2025 08:17 — forked from andrewlimaza/remove-auto-renewal-checkbox.php
Remove Auto Renewal Checkbox if Pay by Check is selected
<?php
/**
* Remove Auto Renewal Checkbox if Pay by Check is selected
*
* 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/
*/