Skip to content

Commit

Permalink
Merge pull request #35 from strangerstudios/dev
Browse files Browse the repository at this point in the history
Update dev to latest
  • Loading branch information
andrewlimaza authored Jan 6, 2020
2 parents dec8d5c + a9de62c commit 0366577
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 20 deletions.
27 changes: 7 additions & 20 deletions pmpro-shipping.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

if(!defined('PMPRO_SHIPPING_SHOW_REQUIRED'))
define( 'PMPRO_SHIPPING_SHOW_REQUIRED', true ); //if false required fields won't have asterisks and non-required fields will say (optional)
define( 'PMPRO_SHIPPING_VERSION', '.7' );
define( 'PMPRO_SHIPPING_VERSION', '.8' );

/**
* Load plugin textdomain.
Expand Down Expand Up @@ -463,17 +463,11 @@ function pmproship_pmpro_confirmation_message( $confirmation_message, $pmpro_inv
$szipcode = get_user_meta( $current_user->ID, "pmpro_szipcode", true );
$sphone = get_user_meta( $current_user->ID, "pmpro_sphone", true );
$scountry = get_user_meta( $current_user->ID, "pmpro_scountry", true );

if ( ! empty( $scity ) && ! empty( $sstate ) ) {
$shipping_address = $sfirstname . " " . $slastname . "<br />" . $saddress1 . "<br />";
if ( $saddress2 ) {
$shipping_address .= $saddress2 . "<br />";
}
$shipping_address .= $scity . ", " . $sstate . " " . $szipcode;
$shipping_address .= "<br />" . $scountry;

$shipping_address = pmpro_formatAddress( trim( $sfirstname . ' ' . $slastname ), $saddress1, $saddress2, $scity, $sstate, $szipcode, $scountry, $sphone );

$confirmation_message .= '<br /><h3>' . __( 'Shipping Information:', 'pmpro-shipping' ) . '</h3><p>' . $shipping_address . '</p>';
}
$confirmation_message .= '<br /><h3>' . __( 'Shipping Information:', 'pmpro-shipping' ) . '</h3><p>' . $shipping_address . '</p>';


return $confirmation_message;
}
Expand Down Expand Up @@ -509,15 +503,8 @@ function pmproship_pmpro_email_body( $body, $pmpro_email ) {
$sphone = get_user_meta( $user_id, "pmpro_sphone", true );
$scountry = get_user_meta( $user_id, "pmpro_scountry", true );

if ( ! empty( $scity ) && ! empty( $sstate ) ) {
$shipping_address = $sfirstname . " " . $slastname . "<br />" . $saddress1 . "<br />";
if ( $saddress2 ) {
$shipping_address .= $saddress2 . "<br />";
}
$shipping_address .= $scity . ", " . $sstate . " " . $szipcode;
}
$shipping_address .= "<br />" . $scountry;

$shipping_address = pmpro_formatAddress( trim( $sfirstname . ' ' . $slastname ), $saddress1, $saddress2, $scity, $sstate, $szipcode, $scountry, $sphone );

if ( ! empty( $shipping_address ) ) {
//squeeze the shipping address above the billing information or above the log link
if ( strpos( $body, "Billing Information:" ) ) {
Expand Down
2 changes: 2 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Please visit our premium support site at http://www.paidmembershipspro.com for m

== Changelog ==
= .8 - 2020-01-06 =
* ENHANCEMENT: Added phone data to confirmation message, email and Member's List area.
* ENHANCEMENT: General code improvements and optimization.
* BUG FIX: Improved registration checks for when users did not select the "Same as Billing" option.
* BUG FIX/ENHANCEMENT: Better support for PayPal and other offsite gateways.

Expand Down

0 comments on commit 0366577

Please sign in to comment.