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 | |
| /** | |
| * Send extra expiration warning emails with individual templates. | |
| * Make sure the Extra Expiration Warning Emails Add On is also active. | |
| * https://www.paidmembershipspro.com/add-ons/extra-expiration-warning-emails-add-on/ | |
| * | |
| * Then add this code into a custom plugin or code snippet. | |
| * https://www.paidmembershipspro.com/how-to-add-code-to-wordpress/ | |
| */ | |
| // Tell the expiration warnings add on to use our templates. |
| <?php | |
| /** | |
| * Set the user to "pending" whenever you run an import using the Import Users From CSV Integration for Paid Memberships Pro. | |
| * | |
| * 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 | |
| /** | |
| * Keep pre-existing members on their initial checkout price when manually renewing. Grandfather 'old' members when their levels pricing changes. | |
| * Note: This is not needed for recurring membership levels and is designed for levels with an expiration date. | |
| * | |
| * 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 | |
| /** | |
| * Automatically apply a discount code to Paid Memberships Pro checkout. | |
| * Adjust the discount code that should apply to all checkouts. | |
| * If another discount code is set, use that as prefernce. | |
| * | |
| * Add this code to your site by following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| */ | |
| function my_pmpro_apply_discount_code() { |
| <?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' ); |
| <?php // do not copy | |
| /** | |
| * This recipe will display a list of pages/posts that are protected by adding the shortcode `[mypmpro_display_posts]` to a 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/ | |
| */ |