Skip to content

Instantly share code, notes, and snippets.

Avatar

Theuns Coetzee ipokkel

View GitHub Profile
@ipokkel
ipokkel / change-text-country-email.php
Created Oct 9, 2020
This recipe is an example of how to change and translate localized text strings for PMPro.
View change-text-country-email.php
<?php
/**
* This recipe is an example of how to change and translate localized text strings
* for PMPro.
*
* 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/
*/
@ipokkel
ipokkel / my-pmpro-confirmation-url.php
Created Oct 8, 2020
Redirect certain levels to a custom confirmation page after checkout.
View my-pmpro-confirmation-url.php
<?php
/**
* This recipe will allow you to send predefined Membership Levels to a unique confirmation 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/
*/
function my_pmpro_confirmation_url( $url, $user_id, $level ) {
@ipokkel
ipokkel / change-text-pmpro-set-expiration-date.php
Created Oct 1, 2020
Gettext filter to change localized text strings for PMPro Set Expiration Dates Add On
View change-text-pmpro-set-expiration-date.php
<?php
/**
* This recipe is an example of how to change localized text strings
* for PMPro Set Expiration Date Add On.
*
* 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/
*/
@ipokkel
ipokkel / my-pmpro-email-data-name.php
Created Sep 29, 2020
This recipe adds first name as an email variable that may be used for the PMPro Email Template Editor Add On.
View my-pmpro-email-data-name.php
<?php
/**
* This recipe adds user meta as an email variable
*
* 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/
*/
@ipokkel
ipokkel / add-user-meta-on-level-change.php
Created Sep 29, 2020
Add custom user meta on level change #pmpro
View add-user-meta-on-level-change.php
<?php
/**
* This recipe adds user meta from the options table
* for the user if the user has a membership level.
*
* 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/
*/
@ipokkel
ipokkel / my-pmprorh-manager-and-adminstrator-only-fields.php
Last active Sep 29, 2020
This recipe creates custom fields for membership registration and has a custom profile field function that may be used to display a Register Helper field only to membership manager or administrators.
View my-pmprorh-manager-and-adminstrator-only-fields.php
<?php
/**
* This recipe creates custom fields for membership registration and
* has a custom profile field function that may be used to display a field
* only to membership manager or administrators.
*
* @requires Register Helper Add On
* @link https://www.paidmembershipspro.com/add-ons/pmpro-register-helper-add-checkout-and-profile-fields/
*
* You can add this recipe to your site by creating a custom plugin
@ipokkel
ipokkel / change-text-free-level-cost-text.php
Created Sep 25, 2020
This recipe changes the level cost text "Free" for free levels using the gettext filter.
View change-text-free-level-cost-text.php
<?php
/**
* This recipe changes the level cost text "Free" for
* free levels using the gettext filter.
*
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
*
* 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.
View Change Text on Membership Levels
/**
* This filter will search your codebase for translatable strings and replace when an exact match is found.
*
* Here we're changing 'Membership' to 'Subscription' for Paid Memberships Pro.
*
* Add this code to your PMPro Customizations Plugin
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
* Note: When adding to your Customizations Plugin, be careful not to include the opening php tag on line 1 above.
*
* @param string $output_text this represents the end result
@ipokkel
ipokkel / my-pmpro-terms-and-conditions-checkbox.php
Created Sep 24, 2020
This recipe creates an additional Terms and Conditions checkbox field.
View my-pmpro-terms-and-conditions-checkbox.php
<?php
/**
* This recipe creates an additional Terms and Conditions check field.
*
* @requires Register Helper Add On
* @link https://www.paidmembershipspro.com/add-ons/pmpro-register-helper-add-checkout-and-profile-fields/
*
* 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.
@ipokkel
ipokkel / my-pmpro-redirect-non-members-to-another-page.php
Last active Sep 24, 2020
This recipe will redirect non-members from a specific page to the levels page.
View my-pmpro-redirect-non-members-to-another-page.php
<?php
/**
* This recipe will redirect non-members from a specific page to the levels 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/
*/
You can’t perform that action at this time.