This file contains 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 | |
/* | |
Adding First and Last Name to Checkout Form | |
*/ | |
//add the fields to the form | |
function my_pmpro_checkout_after_password() | |
{ | |
if(!empty($_REQUEST['firstname'])) | |
$firstname = $_REQUEST['firstname']; |
This file contains 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 | |
/* | |
Template Name: Buy | |
*/ | |
/* | |
To make a checkout template for your site and PMPro. | |
1. Create a template page based on your page.php, single,php, index.php, etc. | |
2. Find the area where the post_content usually goes. |
This file contains 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 | |
/* | |
Some WordPress HTTPS Fixes | |
In general, if you are using Paid Memberships Pro, you do not want to use the WordPress HTTPS plugin. PMPro will also secure your links. | |
If you are still receiving SSL errors on your checkout page, try setting the "nuclear" option on the Payment Gateway and SSL settings page of PMPro (v 1.3.19+) | |
If you want to continue using WordPress HTTPS for some reason, add this code to your theme's functions.php or somewhere else to force Paid Memberships Pro | |
to follow WordPress HTTPS' rules for redirecting, etc. | |
*/ | |
//if WordPress HTTPS is activated allow their force_ssl custom field to replace the besecure one | |
function pmpro_WordPressHTTPSForceSSL($besecure) |
This file contains 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 | |
/* | |
In Paid Memberships Pro v1.4+ the memberhsip level description is shown on the checkout page. This code will remove the description on the checkout page. | |
*/ | |
function my_pmpro_remove_description_from_checkout_page($level) | |
{ | |
$level->description = ""; | |
return $level; | |
} | |
add_filter("pmpro_checkout_level", "my_pmpro_remove_description_from_checkout_page"); |
This file contains 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 this into a custom plugin or your active theme's functions.php | |
*/ | |
add_filter("pmpro_besecure", "__return_true"); |
This file contains 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
/* | |
Plugin Name: PMPro Extra Members List CSV Export Columns | |
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-extra-members-list-csv-export-columns/ | |
Description: Add extra fields to the Paid Memberships Pro Members List CSV Export | |
Version: .1 | |
Author: Stranger Studios | |
Author URI: http://www.strangerstudios.com | |
Notes on use: |
This file contains 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
/* | |
Don't show confirm password or email fields on the checkout page. | |
Add this code to your active theme's functions.php or a custom plugin. | |
*/ | |
add_filter("pmpro_checkout_confirm_password", "__return_false"); | |
add_filter("pmpro_checkout_confirm_email", "__return_false"); |
This file contains 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 email subjects. | |
The function checks $email->template and updates the subject as needed. | |
The email template name will be equivalent to the filenames in the /email/ folder of the PMPro plugin. | |
*/ | |
function my_pmpro_email_subject($subject, $email) | |
{ | |
//only checkout emails |
This file contains 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
/* | |
Edit email templates. | |
Other fields to change: | |
* $email->email | |
* $email->from | |
* $email->fromname | |
* $email->subject | |
* $email->template | |
* $email->body |
This file contains 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 employer, title, and department columns to the members list CSV export. | |
Just add this code to your functions.php or a custom plugin. | |
The first function here defines the column headers and a callback function for each column. | |
*/ | |
function my_pmpro_members_list_csv_extra_columns($columns) | |
{ | |
$columns["employer"] = "my_extra_column_employer"; |
OlderNewer