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 | |
| /** | |
| * Restrict Membership Signup by Email Domain | |
| * Make sure to edit the $valid_domains array defined further below | |
| * to include only the domains you'd like to allow. | |
| * | |
| * Add this code to a custom plugin. More info: https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| */ | |
| function my_pmpro_registration_checks_restrict_email_addresses( $value ) { | |
| $email = $_REQUEST['bemail']; |
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
| # Windows image file caches | |
| Thumbs.db | |
| ehthumbs.db | |
| # Folder config file | |
| Desktop.ini | |
| # Recycle Bin used on file shares | |
| $RECYCLE.BIN/ |
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
| # Items to ignore when downloading a zip | |
| .babelrc export-ignore | |
| .editorconfig export-ignore | |
| .gitattributes export-ignore | |
| .gitignore export-ignore | |
| package-lock.json export-ignore | |
| package.json export-ignore | |
| webpack.config.js export-ignore |
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
| /** | |
| * Disable the custom PHPMailer Code for PMPro. | |
| * This will sometimes fix issues with broken/scrambled emails. | |
| * Add this code to a custom plugin. https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| * Notice we run on the wp_mail_content_type hook on priority 15 to make sure | |
| * we run after PMPro sets up the hook here: https://github.com/strangerstudios/paid-memberships-pro/blob/dev/includes/email.php#L127-L137 | |
| */ | |
| function my_disable_pmpro_send_html() { | |
| remove_action('phpmailer_init', 'pmpro_send_html'); | |
| } |
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 | |
| /* | |
| Only allow users to use the trial level once. | |
| Add this code to your active theme's functions.php | |
| or a custom plugin. | |
| Be sure to change the $trial_level_id variable in multiple places. | |
| */ | |
| //get trial level ids | |
| function my_pmpro_trial_level_ids() { | |
| // edit this to be a comma separated list of your trial level ids |
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
| [row] | |
| [col medium="6"] | |
| [pmpro_account section="profile"] | |
| [/col] | |
| [col medium="6"] | |
| [pmpro_account section="membership"] | |
| [/col] | |
| [/row] | |
| [row] |
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
| /** | |
| * Set CVV as a Required Field with PMPro | |
| * Add this code to a custom plugin. https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| * | |
| * NOTE: Doesn't yet work with all gateways. | |
| * You'll need to make sure the gateway is set to require CVV/CVC | |
| * and then add an elseif ( ... ) below to set the $CVV var | |
| * if you see a valid gateway token/etc. | |
| */ | |
| function my_require_cvv_for_reals( $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 | |
| /** | |
| * Add the PMPro meta box to a CPT | |
| */ | |
| function my_add_pmpro_meta_box_to_cpts() { | |
| // Duplicate this row for each CPT. This one adds the meta boxes to 'product' CPTs. | |
| add_meta_box('pmpro_page_meta', 'Require Membership', 'pmpro_page_meta', 'product', 'side' ); | |
| } | |
| add_action( 'admin_menu', 'my_add_pmpro_meta_box_to_cpts', 20 ); |
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 a XOF currency to Paid Memberships Pro | |
| * Add this code into a custom plugin. https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| */ | |
| function pmpro_xof_currency_format( $pmpro_currencies ) { | |
| $pmpro_currencies['XOF'] = array( | |
| 'name' => __( 'West African Franc', 'paid-memberships-pro' ), | |
| 'decimals' => '2', | |
| 'thousands_separator' => ',', | |
| 'decimal_separator' => '.', |
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
| [membership level="0"] | |
| <!--this is shown to non-members and non-logged in visitors--> | |
| <div class="pmpro_message pmpro_alert"> | |
| Already a member? Log In to unlock additional membership options. | |
| </div> | |
| [/membership] |