This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Synchronize Stripe invoice.payment_succeeded Events | |
| * Warning. This code will update your database, | |
| * create new orders, and potentially email your customers. | |
| * Proceed with caution. Back up your database. | |
| * You will likely want to pair this script with a plugin | |
| * or script to disable all email. | |
| * The default limit is 200 events. You may need to increase this | |
| * or update the script to paginate and run events in batches. | |
| * The default delay between event calls is 2 seconds. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| Plugin Name: PMPro Customizations | |
| Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/ | |
| Description: Customizations for PMPro | |
| Version: .2 | |
| Author: Stranger Studios | |
| Author URI: http://www.strangerstudios.com | |
| */ | |
| /* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Unhook JNews Theme Ads if the user is a PMPro member | |
| // Add this code into a custom plugin. | |
| // I am not sure that this is running late enough to override | |
| // the JNews Ad insert. You may need to hook into init later | |
| // or even another hook that runs later. | |
| function my_hide_jnews_ads_from_members() { | |
| // do nothing if PMPro is not running | |
| if ( ! function_exists( 'pmpro_hasMembershipLevel' ) ) { | |
| return; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RewriteBase / | |
| RewriteRule ^wp-content/uploads/(.*\.pdf)$ /wp-content/plugins/paid-memberships-pro/services/getfile.php [L] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| define('PMPRO_GETFILE_ENABLED', true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RewriteBase / | |
| RewriteRule ^wp-content/uploads/(.*)$ /wp-content/plugins/paid-memberships-pro/services/getfile.php [L] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RewriteBase / | |
| RewriteRule ^wp-content/uploads/.*(\.pdf|\.doc|\.docx|\.ppt|\.zip)$ /wp-content/plugins/paid-memberships-pro/services/getfile.php [L] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Change PMPro to only track visits for logged in users. | |
| * Add this code into a custom plugin or code snippet. | |
| */ | |
| function my_pmpro_report_login_wp_visits_only_for_users() { | |
| if ( ! is_user_logged_in() ) { | |
| remove_action( 'wp', 'pmpro_report_login_wp_visits' ); | |
| } | |
| } | |
| add_action( 'init', 'my_pmpro_report_login_wp_visits_only_for_users' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Allow meta filtering of the membership directory | |
| * if pk and ps params are passed into the URL. | |
| * PMPro and the PMPro Member Directory Add Ons should be active. | |
| * Then add this code to a custom plugin. | |
| * https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| */ | |
| function my_add_meta_queries_to_pmpro_directory_search( $sql_parts ) { | |
| global $wpdb; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| Custom directory template. Adds alphabetical last name query. For example you can use the URL: | |
| http://www.example.com/membership-account/directory/?lt=A | |
| if you want all the members with last names starting with 'A'. | |
| Also includes meta key/value search. For example you can use the URL: | |