Skip to content

Instantly share code, notes, and snippets.

View dwanjuki's full-sized avatar

David Wanjuki dwanjuki

  • Nairobi, Kenya
  • 20:54 (UTC +03:00)
View GitHub Profile
@dwanjuki
dwanjuki / pmpro_advanced_levels-compare_table.css
Created July 24, 2024 08:28
Add a colored border around the highlighted Advanced Levels Compare table column
/* Advanced Levels Compare table - add border to highlighted column */
.pmpro_advanced_levels-compare_table thead th.pmpro_level-highlight,
.pmpro_advanced_levels-compare_table tbody td.pmpro_level-highlight,
.pmpro_advanced_levels-compare_table tfoot td.pmpro_level-highlight {
border-left: 6px solid #00d084;
border-right: 6px solid #00d084;
}
#pmpro_levels.pmpro_advanced_levels-compare_table tfoot tr:last-child td.pmpro_level-highlight {
border-bottom: 6px solid #00d084;
@dwanjuki
dwanjuki / my_pmpro_no_access_message_body.php
Created July 23, 2024 09:21
Custom no access message that includes membership level names
<?php
/**
* Custom "no access" message that includes membership level names
*
* 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_custom_no_access_message_body( $body, $required_level_ids ) {
@dwanjuki
dwanjuki / my_pmpro_shipping_address_country_options.php
Created July 22, 2024 11:47
Specify shipping countries available per level
<?php
/**
* Specify shipping countries available per level
*
* List of country codes: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes
*
* 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_group_accounts_change_text.php
Created July 15, 2024 13:46
Group Accounts: Change "seat" to "branches" using the gettext filter example
<?php
/**
* Group Accounts: Change "seat" to "branches" using the gettext filter example
*
* 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_body_remove_shipping_address.php
Created July 15, 2024 13:03
Remove the Shipping Address from PMPro emails
<?php
/**
* Remove the Shipping Address from PMPro 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_affiliates_tracking_exclude_levels.php
Created July 11, 2024 08:00
Exclude some membership level purchases from PMPro Affiliate tracking
<?php
/**
* Exclude some membership level purchases from PMPro Affiliate tracking
*
* 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_affiliates_tracking_exclude_levels( $order ){
@dwanjuki
dwanjuki / my_pmpro_affiliates_skip_discounted_checkouts.php
Created July 10, 2024 11:32
Exclude discounted checkouts from PMPro Affiliate tracking
<?php
/**
* Exclude discounted membership checkouts from PMPro Affiliate tracking
*
* 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_affiliates_skip_discounted_checkouts( $order ){
@dwanjuki
dwanjuki / my_pmpro_members_list_csv_display_name_column.php
Created July 5, 2024 13:20
Add the user's Display Name to the Members List CSV export
<?php
/**
* Add the user's Display Name to the Members List 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_pmpro_buddypress_profile_template_redirect.php
Last active July 4, 2024 08:19 — forked from kimwhite/my_pmpro_buddypress_profile_template_redirect.php
Redirect the PMPro Profile Edit and Password Reset pages to the user's BuddyPress Profile and Settings pages respectively
<?php
/**
* Redirect the PMPro Profile Edit and Password Reset pages
* to the user's BuddyPress Profile and Settings 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_buddyboss_profile_account_shortcode.php
Created July 3, 2024 12:09
Remove PMPro "profile" section from the BuddyPress profile page Membership tab
<?php // copy from below
/**
* Customize sections displayed on the Membership tab of the BuddyPress profile page
*
* Remove "Profile" section
*
* 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/