Paid Memberships Pro - Version 1.7.15.2

Version Description

  • BUG: Stripe JS looks for a field with id AND name
Download this release

Release Info

Developer strangerstudios
Plugin Icon 128x128 Paid Memberships Pro
Version 1.7.15.2
Comparing to
See all releases

Code changes from version 1.7.15.1 to 1.7.15.2

classes/gateways/class.pmprogateway_payflowpro.php CHANGED
@@ -416,7 +416,8 @@
416
  curl_setopt($ch, CURLOPT_POST, 1);
417
 
418
  // NVPRequest for submitting to server
419
- $nvpreq = "TRXTYPE=" . urlencode($methodName_) . "&TENDER=C&PARTNER=" . urlencode($PARTNER) . "&VENDOR=" . urlencode($VENDOR) . "&USER=" . urlencode($USER) . "&PWD=" . urlencode($PWD) . "&VERBOSITY=medium" . $nvpStr_;
 
420
 
421
  // setting the nvpreq as POST FIELD to curl
422
  curl_setopt($ch, CURLOPT_POSTFIELDS, $nvpreq);
416
  curl_setopt($ch, CURLOPT_POST, 1);
417
 
418
  // NVPRequest for submitting to server
419
+ $nvpreq = "TRXTYPE=" . $methodName_ . "&TENDER=C&PARTNER=" . $PARTNER . "&VENDOR=" . $VENDOR . "&USER=" . $USER . "&PWD=" . $PWD . "&VERBOSITY=medium" . $nvpStr_;
420
+ //$nvpreq = "TRXTYPE=" . urlencode($methodName_) . "&TENDER=C&PARTNER=" . urlencode($PARTNER) . "&VENDOR=" . urlencode($VENDOR) . "&USER=" . urlencode($USER) . "&PWD=" . urlencode($PWD) . "&VERBOSITY=medium" . $nvpStr_;
421
 
422
  // setting the nvpreq as POST FIELD to curl
423
  curl_setopt($ch, CURLOPT_POSTFIELDS, $nvpreq);
css/frontend.css CHANGED
@@ -83,7 +83,7 @@ form.pmpro_form #pmpro_processing_message {margin: 5px 0 0 10px; font-style: ita
83
  ----------------------------------------------------*/
84
  .pmpro_message {background-color: #d9edf7; margin: .5em 0; padding: 10px 15px; color: #31708f; font-size: 14px; font-weight: 400; line-height: 1.5em; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; border: 1px solid #bce8f1; }
85
 
86
- .pmpro_success {background-color: #dff0d8; color: #3c763d; border-color: #bce8f1; }
87
  .pmpro_error {background-color: #f2dede; color: #a94442; border-color: #ebccd1; }
88
  .pmpro_alert {background-color: #fcf8e3; color: #8a6d3b; border-color: #faebcc;}
89
 
@@ -171,4 +171,4 @@ li.pmpro_more {list-style-type: none; text-align: center; margin-left: -20px; pa
171
  .bot0em {margin-bottom: 0em;}
172
  .clear {clear: both; }
173
 
174
- .pmpro_small {font-size: .8em;}
83
  ----------------------------------------------------*/
84
  .pmpro_message {background-color: #d9edf7; margin: .5em 0; padding: 10px 15px; color: #31708f; font-size: 14px; font-weight: 400; line-height: 1.5em; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; border: 1px solid #bce8f1; }
85
 
86
+ .pmpro_success {background-color: #dff0d8; color: #3c763d; border-color: #d6e9c6; }
87
  .pmpro_error {background-color: #f2dede; color: #a94442; border-color: #ebccd1; }
88
  .pmpro_alert {background-color: #fcf8e3; color: #8a6d3b; border-color: #faebcc;}
89
 
171
  .bot0em {margin-bottom: 0em;}
172
  .clear {clear: both; }
173
 
174
+ .pmpro_small {font-size: .8em;}
includes/email.php CHANGED
@@ -60,11 +60,8 @@ if(empty($email_member_notification))
60
  */
61
  function pmpro_send_html( $phpmailer ) {
62
 
63
- //check if we should wpautop later
64
- if($phpmailer->Body == strip_tags($phpmailer->Body))
65
- $wpautop = true;
66
- else
67
- $wpautop = false;
68
 
69
  // Set the original plain text message
70
  $phpmailer->AltBody = wp_specialchars_decode($phpmailer->Body, ENT_QUOTES);
@@ -73,18 +70,28 @@ function pmpro_send_html( $phpmailer ) {
73
  // Convert line breaks & make links clickable
74
  $phpmailer->Body = make_clickable ($phpmailer->Body);
75
 
76
- // Add header to message if found
77
  if(file_exists(get_stylesheet_directory() . "/email_header.html"))
78
- $phpmailer->Body = file_get_contents(get_stylesheet_directory() . "/email_header.html") . "\n" . $phpmailer->Body;
79
  elseif(file_exists(get_template_directory() . "/email_header.html"))
80
- $phpmailer->Body = file_get_contents(get_template_directory() . "/email_header.html") . "\n" . $phpmailer->Body;
 
 
81
 
82
- // Add footer to message if found
83
  if(file_exists(get_stylesheet_directory() . "/email_footer.html"))
84
- $phpmailer->Body = $phpmailer->Body . "\n" . file_get_contents(get_stylesheet_directory() . "/email_footer.html");
85
  elseif(file_exists(get_template_directory() . "/email_footer.html"))
86
- $phpmailer->Body = $phpmailer->Body . "\n" . file_get_contents(get_template_directory() . "/email_footer.html");
87
-
 
 
 
 
 
 
 
 
88
  // Replace variables in email
89
  global $current_user;
90
  $data = array(
@@ -100,7 +107,11 @@ function pmpro_send_html( $phpmailer ) {
100
  $phpmailer->Body = str_replace("!!" . $key . "!!", $value, $phpmailer->Body);
101
  }
102
 
103
- if($wpautop)
 
 
 
 
104
  $phpmailer->Body = wpautop($phpmailer->Body);
105
 
106
  do_action("pmpro_after_phpmailer_init", $phpmailer);
60
  */
61
  function pmpro_send_html( $phpmailer ) {
62
 
63
+ //to check if we should wpautop later
64
+ $original_body = $phpmailer->Body;
 
 
 
65
 
66
  // Set the original plain text message
67
  $phpmailer->AltBody = wp_specialchars_decode($phpmailer->Body, ENT_QUOTES);
70
  // Convert line breaks & make links clickable
71
  $phpmailer->Body = make_clickable ($phpmailer->Body);
72
 
73
+ // Get header for message if found
74
  if(file_exists(get_stylesheet_directory() . "/email_header.html"))
75
+ $header = file_get_contents(get_stylesheet_directory() . "/email_header.html");
76
  elseif(file_exists(get_template_directory() . "/email_header.html"))
77
+ $header = file_get_contents(get_template_directory() . "/email_header.html");
78
+ else
79
+ $header = "";
80
 
81
+ // Get footer for message if found
82
  if(file_exists(get_stylesheet_directory() . "/email_footer.html"))
83
+ $footer = file_get_contents(get_stylesheet_directory() . "/email_footer.html");
84
  elseif(file_exists(get_template_directory() . "/email_footer.html"))
85
+ $footer = file_get_contents(get_template_directory() . "/email_footer.html");
86
+ else
87
+ $footer = "";
88
+
89
+ // Add header/footer to the email
90
+ if(!empty($header))
91
+ $phpmailer->Body = $header . "\n" . $phpmailer->Body;
92
+ if(!empty($footer))
93
+ $phpmailer->Body = $phpmailer->Body . "\n" . $footer;
94
+
95
  // Replace variables in email
96
  global $current_user;
97
  $data = array(
107
  $phpmailer->Body = str_replace("!!" . $key . "!!", $value, $phpmailer->Body);
108
  }
109
 
110
+ // If there is no HTML, run through wpautop
111
+ if($original_body == strip_tags($original_body) &&
112
+ $header == strip_tags($header) &&
113
+ $footer == strip_tags($footer)
114
+ )
115
  $phpmailer->Body = wpautop($phpmailer->Body);
116
 
117
  do_action("pmpro_after_phpmailer_init", $phpmailer);
paid-memberships-pro.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Paid Memberships Pro
4
  Plugin URI: http://www.paidmembershipspro.com
5
  Description: Plugin to Handle Memberships
6
- Version: 1.7.15.1
7
  Author: Stranger Studios
8
  Author URI: http://www.strangerstudios.com
9
  */
@@ -13,7 +13,7 @@ Author URI: http://www.strangerstudios.com
13
  */
14
 
15
  //version constant
16
- define("PMPRO_VERSION", "1.7.15.1");
17
 
18
  //if the session has been started yet, start it (ignore if running from command line)
19
  if(defined('STDIN') )
3
  Plugin Name: Paid Memberships Pro
4
  Plugin URI: http://www.paidmembershipspro.com
5
  Description: Plugin to Handle Memberships
6
+ Version: 1.7.15.2
7
  Author: Stranger Studios
8
  Author URI: http://www.strangerstudios.com
9
  */
13
  */
14
 
15
  //version constant
16
+ define("PMPRO_VERSION", "1.7.15.2");
17
 
18
  //if the session has been started yet, start it (ignore if running from command line)
19
  if(defined('STDIN') )
preheaders/checkout.php CHANGED
@@ -183,7 +183,7 @@ if ($gateway == "stripe" && !pmpro_isLevelFree($pmpro_level)) {
183
  form$.append("<input type='hidden' name='stripeToken' value='" + token + "'/>");
184
 
185
  //insert fields for other card fields
186
- if(jQuery('#CardType').length)
187
  jQuery('#CardType').val(response['card']['brand']);
188
  else
189
  form$.append("<input type='hidden' name='CardType' value='" + response['card']['brand'] + "'/>");
@@ -466,7 +466,7 @@ if ($submit && $pmpro_msgt != "pmpro_error") {
466
  }
467
  }
468
 
469
- if (!empty($pmpro_error_fields)) {
470
  pmpro_setMessage(__("Please complete all required fields.", "pmpro"), "pmpro_error");
471
  }
472
  if (!empty($password) && $password != $password2) {
183
  form$.append("<input type='hidden' name='stripeToken' value='" + token + "'/>");
184
 
185
  //insert fields for other card fields
186
+ if(jQuery('#CardType[name=CardType]').length)
187
  jQuery('#CardType').val(response['card']['brand']);
188
  else
189
  form$.append("<input type='hidden' name='CardType' value='" + response['card']['brand'] + "'/>");
466
  }
467
  }
468
 
469
+ if (!empty($pmpro_error_fields)) {
470
  pmpro_setMessage(__("Please complete all required fields.", "pmpro"), "pmpro_error");
471
  }
472
  if (!empty($password) && $password != $password2) {
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: strangerstudios
3
  Tags: memberships, membership, authorize.net, ecommerce, paypal, stripe, braintree, restrict access, restrict content, directory site, payflow
4
  Requires at least: 3.5
5
- Tested up to: 4.0
6
- Stable tag: 1.7.15.1
7
 
8
  The easiest way to GET PAID with your WordPress site. Flexible content control by Membership Level, Reports, Affiliates and Discounts
9
 
@@ -102,6 +102,11 @@ Not sure? You can find out by doing a bit a research.
102
  4. Offer Membership Discounts with specific price rules (restricted by level, unique pricing for each level, # of uses, expiration date.)
103
 
104
  == Changelog ==
 
 
 
 
 
105
  = 1.7.15.1 =
106
  * BUG: Fixed issue where "complete all required fields" was being shown when using Stripe. They are calling the CardType "brand" in their return object, not "type".
107
  * BUG: Removed code from includes/notifications.php that was deleting the transient used to keep PMPro installs from hitting the PMPro server too often.
2
  Contributors: strangerstudios
3
  Tags: memberships, membership, authorize.net, ecommerce, paypal, stripe, braintree, restrict access, restrict content, directory site, payflow
4
  Requires at least: 3.5
5
+ Tested up to: 4.0.1
6
+ Stable tag: 1.7.15.2
7
 
8
  The easiest way to GET PAID with your WordPress site. Flexible content control by Membership Level, Reports, Affiliates and Discounts
9
 
102
  4. Offer Membership Discounts with specific price rules (restricted by level, unique pricing for each level, # of uses, expiration date.)
103
 
104
  == Changelog ==
105
+ = 1.7.15.2 =
106
+ * BUG: Stripe JS looks for a field with id AND name = CardType now so the new checkout code is compatible with older checkout templates and will avoid "complete all fields" errors.
107
+ * BUG: Removed the urlencode wrappers on the Payflow API calls. Payflow seems to expect the values to be NOT encoded.
108
+ * BUG: No longer running email content through wpautop if there is already HTML in an included header or footer for the email. (Thanks, Erik Bertrand)
109
+
110
  = 1.7.15.1 =
111
  * BUG: Fixed issue where "complete all required fields" was being shown when using Stripe. They are calling the CardType "brand" in their return object, not "type".
112
  * BUG: Removed code from includes/notifications.php that was deleting the transient used to keep PMPro installs from hitting the PMPro server too often.