Skip to content

Commit a329556

Browse files
RELEASE: 5.0.45
1 parent fee289d commit a329556

File tree

130 files changed

+1556
-255
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+1556
-255
lines changed

CHANGELOG.md

Lines changed: 36 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## Releases
88

9-
### [5.0.42]
9+
### [5.0.45]
1010

1111
#### Added
1212
- NEW
1313

1414
#### Fixed
15-
- [SaaS. Fix fatals from Jul 24th (#1924)](https://github.com/eventespresso/cafe/pull/1924)
16-
- [Previous value in method update_extra_meta (#1936)](https://github.com/eventespresso/cafe/pull/1936)
17-
- [Fix SPCO Available Payment Methods Setup (#1927)](https://github.com/eventespresso/cafe/pull/1927)
15+
- [Dont send address to PayPal if country code is not a 2 character ISO 3166 code (#1947)](https://github.com/eventespresso/cafe/pull/1947)
1816
- FIX
1917

2018
#### Changed
21-
- [Update type AssignmentStatus in Ticket Assignment Manager. (Barista#1408) (#1920)](https://github.com/eventespresso/cafe/pull/1920)
22-
- [Fix PayPal Commerce order request (#1921)](https://github.com/eventespresso/cafe/pull/1921)
19+
- [Trailing 0 Removed from Ticket Price Calculator (Barista#1426) (#1940)](https://github.com/eventespresso/cafe/pull/1940)
20+
- [REM tickets do not fully retain their state when editing (Barista#1368) (#1942)](https://github.com/eventespresso/cafe/pull/1942)
21+
- [PayPal Commerce - if no country has been set use state iso (#1956)](https://github.com/eventespresso/cafe/pull/1956)
22+
- [Add Post Variable to Events List Event Class Filter (#1960)](https://github.com/eventespresso/cafe/pull/1960)
23+
- [Fix readme and changelog (#1959)](https://github.com/eventespresso/cafe/pull/1959)
2324
- MOD
2425

2526
#### Deprecated
@@ -33,15 +34,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3334

3435

3536

36-
### [5.0.41]
37+
### [5.0.44]
38+
39+
#### Fixed
40+
- [Fix PayPal Commerce payments when no address information is available (#1937)](https://github.com/eventespresso/cafe/pull/1937)
41+
3742

3843

44+
### [5.0.43]
45+
46+
#### Fixed
47+
- [SaaS. Fix fatals from Jul 24th (#1924)](https://github.com/eventespresso/cafe/pull/1924)
48+
- [Previous value in method update_extra_meta (#1936)](https://github.com/eventespresso/cafe/pull/1936)
49+
- [Fix SPCO Available Payment Methods Setup (#1927)](https://github.com/eventespresso/cafe/pull/1927)
50+
51+
#### Changed
52+
- [Update type AssignmentStatus in Ticket Assignment Manager. (Barista#1408) (#1920)](https://github.com/eventespresso/cafe/pull/1920)
53+
- [Fix PayPal Commerce order request (#1921)](https://github.com/eventespresso/cafe/pull/1921)
54+
55+
56+
57+
### [5.0.42]
58+
3959
#### Fixed
4060
- [Fix Additional Registrant Incomplete Reg Forms (#1856)](https://github.com/eventespresso/cafe/pull/1856)
4161
- [Fix License Keys Admin Menu Loading on Multisite (#1860)](https://github.com/eventespresso/cafe/pull/1860)
4262
- [Fix PluginLicense Error During Cron (#1866)](https://github.com/eventespresso/cafe/pull/1866)
4363
- [Fix Version Parsing (#1883)](https://github.com/eventespresso/cafe/pull/1883)
44-
- [Prevent _load_textdomain_just_in_time notice from GraphQL (#1882)](https://github.com/eventespresso/cafe/pull/1882)
64+
- [Prevent load_textdomain_just_in_time notice from GraphQL (#1882)](https://github.com/eventespresso/cafe/pull/1882)
4565
- [Fix Admin Page RSS Feed (#1893)](https://github.com/eventespresso/cafe/pull/1893)
4666
- [PPC. Fix updating onboarding status (#1888)](https://github.com/eventespresso/cafe/pull/1888)
4767
- [Modify System Hook Points (#1891)](https://github.com/eventespresso/cafe/pull/1891)
@@ -64,6 +84,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6484

6585

6686

87+
### [5.0.41]
88+
89+
#### Changed
90+
- [Fix RegFormHandler not processing multiple registrations](https://github.com/eventespresso/cafe/pull/1837)
91+
- [Don't migrate EE3 options that are no longer used](https://github.com/eventespresso/cafe/pull/1845)
6792

6893

6994

@@ -109,19 +134,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
109134
- [Fixed Backspace in Date Input Crashes Calendar (Barista#1367) #1792](https://github.com/eventespresso/cafe/pull/1792)
110135

111136

137+
112138
### [5.0.38]
113139

114140
#### Added
115141
- [Add support for Stripe partner fees (#1769)](https://github.com/eventespresso/cafe/pull/1769)
116142

117143

118144

119-
120-
121-
122145
### [5.0.37]
123146

124-
125147
#### Fixed
126148
- [Hide Final PM Deprecation Notice If Nothing Deactivated (#1761)](https://github.com/eventespresso/cafe/pull/1761)
127149
- [Fix Version Parsing in PHP 7.4 (#1762)](https://github.com/eventespresso/cafe/pull/1762)
@@ -131,12 +153,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
131153

132154

133155

134-
135-
136-
137156
### [5.0.36]
138157

139-
140158
#### Fixed
141159
- [Use correct label_count default for a custom post status (#1738)](https://github.com/eventespresso/cafe/pull/1738)
142160

@@ -147,12 +165,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
147165

148166

149167

150-
151-
152-
153168
### [5.0.35]
154169

155-
156170
#### Fixed
157171
- [Fix Conditional Question Trigger ID Sanitization (#1677)](https://github.com/eventespresso/cafe/pull/1677)
158172
- [Allow HTML within Question Text and Question options (#1711)](https://github.com/eventespresso/cafe/pull/1711)
@@ -163,27 +177,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
163177

164178

165179

166-
167-
168-
169180
### [5.0.34]
170181

171-
172182
#### Fixed
173183
- [PPC. Fix Payment Methods Pro support for PayPal Commerce (#1696)](https://github.com/eventespresso/cafe/pull/1696)
174184
- [Fix Conflict With REM Styles (#1697)](https://github.com/eventespresso/cafe/pull/1697)
175185
- [Fix registration question admin label field not saving (#1647)](https://github.com/eventespresso/cafe/pull/1647)
176-
177-
178-
179-
180-
181-
182-
183-
### [..]
184-
185-
186-
#### Fixed
187186
- [Fix SaaS Signup Form (#1660)](https://github.com/eventespresso/cafe/pull/1660)
188187
- [Fix SPCO Attendee Info Ticket Display (#1636)](https://github.com/eventespresso/cafe/pull/1636)
189188

@@ -192,9 +191,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
192191

193192

194193

195-
196-
197-
198194
### [5.0.33]
199195

200196
#### Fixed
@@ -205,9 +201,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
205201

206202

207203

208-
209-
210-
211204
### [5.0.32]
212205

213206
#### Added
@@ -216,12 +209,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
216209

217210

218211

219-
220-
221-
222212
### [5.0.31]
223213

224-
225214
#### Fixed
226215
- [Add Nonce for Add New State AJAX Requests (#1630)](https://github.com/eventespresso/cafe/pull/1630)
227216
- [PUE Fix - Dont translate plugin data when checking version numbers (#1632)](https://github.com/eventespresso/cafe/pull/1632)
@@ -232,9 +221,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
232221

233222

234223

235-
236-
237-
238224
### [5.0.30]
239225

240226
#### Added
@@ -263,9 +249,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
263249

264250

265251

266-
267-
268-
269252
### [5.0.29]
270253

271254
#### Fixed
@@ -276,9 +259,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
276259

277260

278261

279-
280-
281-
282262
### [5.0.28]
283263

284264
#### Added
@@ -294,7 +274,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
294274
- [Fix CSS Output in iFrames (#1552)](https://github.com/eventespresso/cafe/pull/1552)
295275
- [Fix venue not being unassigned in EDTR (GraphQL) (#1561)](https://github.com/eventespresso/cafe/pull/1561)
296276
- [Fix Missing Check-ins Bulk Actions (#1549)](https://github.com/eventespresso/cafe/pull/1549)
297-
- [Fix Typing for EE_Datetime_Field::_prepare_for_display() (#1570)](https://github.com/eventespresso/cafe/pull/1570)
277+
- [Fix Typing for EE_Datetime_Field::prepare_for_display() (#1570)](https://github.com/eventespresso/cafe/pull/1570)
298278
- [Fix List Table Views (#1576)](https://github.com/eventespresso/cafe/pull/1576)
299279
- [Fix MER Max Ticket Quantity Violations (#1567)](https://github.com/eventespresso/cafe/pull/1567)
300280

@@ -729,7 +709,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
729709
- [Fix Co logo max width on Invoice/Receipt (#775)](https://github.com/eventespresso/cafe/pull/775)
730710
- [Allow attributes passed to the fallback_shortcode_processor to be an empty string (#743)](https://github.com/eventespresso/cafe/pull/743)
731711
- [Fix Nag Notice Display (#779)](https://github.com/eventespresso/cafe/pull/779)
732-
- [Walk Back $_cpt_model_obj Property Type Declaration (#783)](https://github.com/eventespresso/cafe/pull/783)
712+
- [Walk Back $cpt_model_obj Property Type Declaration (#783)](https://github.com/eventespresso/cafe/pull/783)
733713
- [Use GRAPHQL_DEBUG and Fix Conditional (#785)](https://github.com/eventespresso/cafe/pull/785)
734714
- [Fix Edit CPT Route for Attendees (#797)](https://github.com/eventespresso/cafe/pull/797)
735715
- [Make Admin Only Tickets Visible to Super Admins (#798)](https://github.com/eventespresso/cafe/pull/798)

PaymentMethods/PayPalCommerce/api/orders/CreateOrder.php

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
namespace EventEspresso\PaymentMethods\PayPalCommerce\api\orders;
44

55
use EE_Error;
6+
use EE_Country;
67
use EE_Line_Item;
78
use EE_Payment;
8-
use EEM_Payment;
9+
use EE_State;
910
use EE_Transaction;
11+
use EEM_Country;
12+
use EEM_Payment;
1013
use EventEspresso\core\domain\services\capabilities\FeatureFlag;
1114
use EventEspresso\core\domain\services\capabilities\FeatureFlags;
1215
use EventEspresso\core\domain\services\validation\email\strategies\Basic;
@@ -183,8 +186,26 @@ protected function getParameters(): array
183186
],
184187
];
185188

189+
$CNT_ISO = $attendee->country_ID();
190+
191+
// No country ID set, maybe just state?
192+
if(empty($CNT_ISO)) {
193+
$state_obj = $attendee->state_obj();
194+
if ($state_obj instanceof EE_State) {
195+
$CNT_ISO = $state_obj->country_iso();
196+
}
197+
}
198+
199+
if (strlen($CNT_ISO > 2)) {
200+
// uh-oh... did someone save the country name for the ISO?
201+
$country = EEM_Country::instance()->getCountryByName(ucwords(strtolower($CNT_ISO)));
202+
if ($country instanceof EE_Country) {
203+
$CNT_ISO = $country->ISO();
204+
}
205+
}
206+
186207
// If we have and address on the attendee, send it to PayPal.
187-
if($attendee->country_ID()) {
208+
if($CNT_ISO && strlen($CNT_ISO == 2)) {
188209
$parameters['payment_source']['paypal']['address'] = [
189210
'address_line_1' => $attendee->address(),
190211
'address_line_2' => $attendee->address2(),

VERSION

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

0 commit comments

Comments
 (0)