Some users reported the recipe not redirecting to the referer after checkout.
Updated the my_pmpro_redirect_to_referring_page_after_checkout_track
function that sets the cookie here: ipokkel/32d6ba9425d4550a5861709498e00135
<?php | |
/* | |
This code handles loading a file from one or more protected directories. | |
This is a variation of the code presented here: | |
https://www.paidmembershipspro.com/locking-non-wordpress-files-folders-paid-memberships-pro/ | |
(!) Be sure to change the $protected_directories arary below. | |
(!) Add this code to a code snippet or custom plugin. | |
(!) You should have a corresponding bit of code in your Apache .htaccess file | |
to redirect files to this script. You need one line per protected dir. | |
### |
Some users reported the recipe not redirecting to the referer after checkout.
Updated the my_pmpro_redirect_to_referring_page_after_checkout_track
function that sets the cookie here: ipokkel/32d6ba9425d4550a5861709498e00135
<?php // do not copy this line | |
/** | |
* This recipe will disable the recurring payment email reminders for the specifc levels stated | |
* | |
* 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 | |
/** | |
* Hide the BuddyPress/BuddyBoss activity buttons for members that don't have level 1. | |
* Adjust the code according to your needs. | |
* Add this code to your site by following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_pmpro_hide_bp_activity_meta( $buttons, $activity_id ) { | |
// Check if PMPro is active or not. | |
if ( ! function_exists( 'pmpro_hasMembershipLevel' ) ) { | |
return $buttons; |
<?php | |
/** | |
* Overwrite email templates from child theme HTML templates. | |
* Create html templates in your child theme under paid-memberships-pro/email/ | |
* Add this code to your site by following this guide - | |
*/ | |
function cg_pmpro_load_from_theme_template( $body, $email ) { | |
if ( file_exists( get_stylesheet_directory() . '/paid-memberships-pro/email/' . $email->template . '.html' ) ) { | |
$body = file_get_contents( get_stylesheet_directory() . '/paid-memberships-pro/email/' . $email->template . '.html' ); |
<h3>Lorem Isupm, !!display_name!!</h3> | |
<p>Any content can be added here.</p> | |
<p>Please see the <i>Variable Reference</i> at https://www.paidmembershipspro.com/add-ons/email-templates-admin-editor/</p> | |
<p>Account: !!display_name!! (!!user_email!!)</p> | |
<p>Log in to your membership account here: !!login_link!!</p> |
<?php //do not copy | |
/** | |
* This recipe update the level cost text based on the Country selected. This recipe will work | |
* with the VAT Tax Add On for EU customers. | |
* | |
* 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 will add tax based on the different Canadian regions. | |
* | |
* 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_canada_tax( $tax, $values, $order ) { |
<?php | |
/** | |
* This recipe will geocode the members based on their user account only. | |
* Run /wp-admin/?pmpromm_process_users=true to run the script. | |
* | |
* 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 allows user's to have multiple levels when purchasing via WooCommerce. | |
* Add this code to your site by following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
add_filter( 'pmprowoo_mmpu_force_add_level', '__return_true' ); |