Skip to content

Commit fee289d

Browse files
RELEASE: 5.0.44
1 parent 404a73c commit fee289d

File tree

4 files changed

+18
-13
lines changed

4 files changed

+18
-13
lines changed

PaymentMethods/PayPalCommerce/api/orders/CreateOrder.php

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -172,24 +172,29 @@ protected function getParameters(): array
172172
'payment_source' => [
173173
'paypal' => [
174174
'experience_context' => [
175-
'user_action' => 'PAY_NOW'
175+
'user_action' => 'PAY_NOW',
176176
],
177177
'email_address' => $attendee->email(),
178178
'name' => [
179179
'given_name' => $attendee->fname(),
180180
'surname' => $attendee->lname(),
181181
],
182-
'address' => [
183-
'address_line_1' => $attendee->address(),
184-
'address_line_2' => $attendee->address2(),
185-
'admin_area_2' => $attendee->city(),
186-
'admin_area_1' => $attendee->state_abbrev(),
187-
'postal_code' => $attendee->zip(),
188-
'country_code' => $attendee->country_ID(),
189-
],
190182
],
191183
],
192184
];
185+
186+
// If we have and address on the attendee, send it to PayPal.
187+
if($attendee->country_ID()) {
188+
$parameters['payment_source']['paypal']['address'] = [
189+
'address_line_1' => $attendee->address(),
190+
'address_line_2' => $attendee->address2(),
191+
'admin_area_2' => $attendee->city(),
192+
'admin_area_1' => $attendee->state_abbrev(),
193+
'postal_code' => $attendee->zip(),
194+
'country_code' => $attendee->country_ID(),
195+
];
196+
}
197+
193198
// Do we have the permissions for the fees ?
194199
$scopes = PayPalExtraMetaManager::getPmOption(
195200
$this->transaction->payment_method(),

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.0.43
1+
5.0.44

espresso.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Plugin Name: Event Espresso
44
Plugin URI: https://eventespresso.com/pricing/?ee_ver=ee4&utm_source=ee4_plugin_admin&utm_medium=link&utm_campaign=wordpress_plugins_page&utm_content=support_link
55
Description: Manage events, sell tickets, and receive payments from your WordPress website. Reduce event administration time, cut-out ticketing fees, and own your customer data. | <a href="https://eventespresso.com/add-ons/?utm_source=plugin_activation_screen&utm_medium=link&utm_campaign=plugin_description">Extensions</a> | <a href="https://eventespresso.com/pricing/?utm_source=plugin_activation_screen&utm_medium=link&utm_campaign=plugin_description">Sales</a> | <a href="admin.php?page=espresso_support">Support</a>
6-
Version: 5.0.43
6+
Version: 5.0.44
77
Author: Event Espresso
88
Author URI: https://eventespresso.com/?ee_ver=ee4&utm_source=ee4_plugin_admin&utm_medium=link&utm_campaign=wordpress_plugins_page&utm_content=support_link
99
License: GPLv3
@@ -104,7 +104,7 @@ function espresso_minimum_php_version_error()
104104
*/
105105
function espresso_version(): string
106106
{
107-
return apply_filters('FHEE__espresso__espresso_version', '5.0.43');
107+
return apply_filters('FHEE__espresso__espresso_version', '5.0.44');
108108
}
109109

110110
/**

readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Tags: Events, Tickets, Event Registration, Ticket Sales, Calendar
66
Requires at least: 4.5
77
Requires PHP: 7.4
88
Tested up to: 6.8.2
9-
Stable tag: 5.0.43decaf
9+
Stable tag: 5.0.44decaf
1010
License: GPL2
1111

1212
The best events plugin with event registration, free and paid ticket sales, event registration forms, PayPal payments, automatic emails, and more!

0 commit comments

Comments
 (0)