Skip to content

Commit

Permalink
Express Checkout - Shipping Address Problem, ref #1014
Browse files Browse the repository at this point in the history
  • Loading branch information
kcppdevelopers committed Mar 13, 2018
1 parent 019a2d7 commit b58c2fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion angelleye-includes/angelleye-utility.php
Original file line number Diff line number Diff line change
Expand Up @@ -1865,7 +1865,7 @@ public function call_paypal_pro_payflow_do_doreauthorization($order) {

public static function angelleye_express_checkout_validate_shipping_address($paypal_request) {
if( !empty($paypal_request['SECFields']['addroverride']) && $paypal_request['SECFields']['addroverride'] == 1 ) {
$address_required_field = array('shiptoname', 'shiptostreet', 'shiptostreet2', 'shiptocity', 'shiptostate', 'shiptozip', 'shiptocountrycode');
$address_required_field = array('shiptoname', 'shiptostreet', 'shiptocity', 'shiptostate', 'shiptozip', 'shiptocountrycode');
foreach ($address_required_field as $key => $value) {
if( empty($paypal_request['Payments'][0][$value]) ) {
unset($paypal_request['SECFields']['addroverride']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ public function angelleye_set_express_checkout_request() {

$post_data = WC()->session->get('post_data');
if (!empty($post_data)) {
$SECFields['addroverride'] = WC()->cart->needs_shipping() ? 1 : 0;
$SECFields['addroverride'] = 1;
if (!empty($post_data['ship_to_different_address'])) {
$shiptoname = '';
if (!empty($post_data['shipping_first_name']) && !empty($post_data['shipping_last_name'])) {
Expand Down

0 comments on commit b58c2fd

Please sign in to comment.