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 | |
| /* | |
| Change "Pay by Check" language to "Pay by Bank" | |
| Add this code to your active theme's functions.php | |
| or a custom plugin. | |
| */ | |
| function my_gettext_pay_by_check($translated_text, $text, $domain) | |
| { | |
| if($domain == "pmpro-pay-by-check" && $text == "Pay by Check") |
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 // Do NOT copy this line | |
| /* Copy from below this line */ | |
| /* | |
| Remove state from required billing fields and hide it the state field. | |
| */ | |
| // Unset state | |
| add_action( 'pmpro_required_billing_fields', 'my_pmpro_required_billing_fields' ); |
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: Paid Memberships Pro - South Africa VAT | |
| Plugin URI: TBA | |
| Description: Apply South Africa VAT to Checkouts with PMPro | |
| Version: .1 | |
| 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
| /* | |
| PMPro percent off discount codes. Adds a text field to the discount code settings to define a percentage off the membership level. This will override any other discount code settings for the level. Currently, only works on initial one-time payments. | |
| */ | |
| function pmpropd_pmpro_discount_code_after_level_settings( $code_id, $level ) { | |
| $percents = pmpro_getDCPDs( $code_id ); | |
| if ( ! empty( $percents [ $level->id ] ) ) { | |
| $percent = $percents [ $level->id ]; | |
| } else { | |
| $percent = ''; |
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
| function my_init() | |
| { | |
| global $restricted_countries; | |
| //specify the countries not allowed to signup. The key is the level id. | |
| $restricted_countries = array( | |
| 1 => array('FR', 'IT'), | |
| 2 => array('IT'), | |
| ); | |
| } |
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: Paid Memberships Pro - Mexico GST | |
| Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-mexico-gst/ | |
| Description: Apply Mexico GST to Checkouts with PMPro | |
| Version: .1 | |
| 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
| <?php | |
| /* | |
| Plugin Name: PMPro Customizations | |
| Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/ | |
| Description: Customizations for Paid Memberships Pro | |
| Version: .1 | |
| 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
| <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> | |
| <ins class="adsbygoogle" | |
| style="display:block; text-align:center;" | |
| data-ad-format="fluid" | |
| data-ad-layout="in-article" | |
| data-ad-client="ca-pub-0123456789101112" | |
| data-ad-slot="9876543210"></ins> | |
| <script> | |
| (adsbygoogle = window.adsbygoogle || []).push({}); | |
| </script> |
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 | |
| /** | |
| * Redirect non-members away from 'normal' content to BuddyPress content restricted page. | |
| * Requires the BuddyPress Integration to be installed - https://www.paidmembershipspro.com/add-ons/buddypress-integration/ | |
| * Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| */ | |
| function my_template_redirect_require_membership_access_buddypress() { | |
| if ( ! pmpro_has_membership_access() && ! bp_current_component() && ! is_archive() && ! is_home() && function_exists( 'pmpro_bp_redirect_to_access_required_page' ) ) { | |
| wp_redirect( wp_login_url() ); |