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 pmpro_currencies_ruble($currencies) | |
| { | |
| $currencies['RUB'] = __('Russian Ruble (RUB)', 'pmpro'); | |
| return $currencies; | |
| } | |
| add_filter('pmpro_currencies', 'pmpro_currencies_ruble'); |
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
| /* | |
| Adds !!todaysdate!! as an available variable for use in Paid Memberships Pro emails. | |
| Notice the array key does not include the !!s | |
| */ | |
| function my_pmpro_email_data($data, $email) | |
| { | |
| $data['todaysdate'] = date(get_option("date_format")); | |
| return $data; |
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
| add_filter('pmpro_send_expiration_warning_email', '__return_false'); |
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
| /* | |
| Hide billing address fields and make them optional. | |
| Meant to be used with the Braintree Payments gateway. | |
| */ | |
| //css to hide the fields | |
| function wp_head_hide_billing_fields() | |
| { | |
| global $post, $pmpro_pages; | |
| if(empty($pmpro_pages) || (!is_page($pmpro_pages['checkout']) && !is_page($pmpro_pages['billing']))) | |
| 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
| <?php | |
| /* | |
| Plugin Name: PMPro Fields | |
| Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-fields/ | |
| Description: Register Helper Initialization Example | |
| 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 | |
| /* | |
| If checking out for ANY level with an expiration, add remaining days to the enddate. | |
| Pulled in from: https://gist.github.com/3678054 | |
| */ | |
| function my_pmpro_checkout_level_extend_memberships($level) | |
| { | |
| global $pmpro_msg, $pmpro_msgt, $current_user; | |
| //does this level expire? are they an existing members with an expiration date? |
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
| /* | |
| Get PMPro Pay By Check and PMPro Add PayPal Express to work together. | |
| */ | |
| //remove the checkout_boxes code from both plugins | |
| function my_init_pmpro_payment_options() | |
| { | |
| remove_action("pmpro_checkout_boxes", "pmpropbc_checkout_boxes"); | |
| remove_action("pmpro_checkout_boxes", "pmproappe_pmpro_checkout_boxes", 20); | |
| add_action("pmpro_checkout_boxes", "my_pmpro_checkout_boxes_payment_options"); |
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_pmpro_confirmation_url($url, $user_id, $level) { | |
| $already_member = get_user_meta($user_id, 'already_member', true); | |
| if(!$already_member) { | |
| update_user_meta($user_id, 'already_member', 1); | |
| $url = home_url('/my-dashboard'); | |
| } | |
| return $url; | |
| } | |
| add_filter('pmpro_confirmation_url', 'my_pmpro_confirmation_url'); |
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
| /* | |
| Only let level 1 members sign up if they use a discount code. | |
| Place this code in your active theme's functions.php or a custom plugin. | |
| */ | |
| function my_pmpro_registration_checks_require_code_to_register($pmpro_continue_registration) | |
| { | |
| //only bother if things are okay so far | |
| if(!$pmpro_continue_registration) | |
| return $pmpro_continue_registration; |
NewerOlder