Skip to content

Commit

Permalink
Merge branch 'Issue-602' of https://github.com/angelleye/paypal-wooco…
Browse files Browse the repository at this point in the history
…mmerce into dev
  • Loading branch information
kcppdevelopers committed Dec 8, 2016
2 parents 5fdc057 + 67b203b commit 716d41c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions classes/wc-gateway-paypal-express-angelleye.php
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,27 @@ function paypal_express_checkout($posted = null) {
if (isset($result['SHIPTOZIP'])) {
WC()->customer->set_shipping_postcode($result['SHIPTOZIP']);
}

if ($this->billing_address == 'yes') {
if (isset($result['SHIPTOSTREET'])) {
WC()->customer->set_address($result['SHIPTOSTREET']);
}
if (isset($result['SHIPTOSTREET2'])) {
WC()->customer->set_address_2($result['SHIPTOSTREET2']);
}
if (isset($result['SHIPTOCITY'])) {
WC()->customer->set_city($result['SHIPTOCITY']);
}
if (isset($result['SHIPTOCOUNTRYCODE'])) {
WC()->customer->set_country($result['SHIPTOCOUNTRYCODE']);
}
if (isset($result['SHIPTOSTATE'])) {
WC()->customer->set_state($this->get_state_code($result['SHIPTOCOUNTRYCODE'], $result['SHIPTOSTATE']));
}
if (isset($result['SHIPTOZIP'])) {
WC()->customer->set_postcode($result['SHIPTOZIP']);
}
}

/**
* Save GECD data in sessions for use in DECP
Expand Down

0 comments on commit 716d41c

Please sign in to comment.