tf-checkout-react 1.3.9 → 1.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.3.9",
2
+ "version": "1.3.10",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -306,6 +306,7 @@ export const BillingInfoContainer = React.memo(
306
306
  const hideTtfOptIn: boolean = _get(cartInfoData, 'hide_ttf_opt_in', true)
307
307
  const expirationTime = _get(cartInfoData, 'expiresAt')
308
308
  const flagRequirePhone = getQueryVariable('phone_required') === 'true'
309
+ const hidePhoneField = getQueryVariable('hide_phone_field') === 'true'
309
310
 
310
311
  // Get prevProps
311
312
  const prevData = useRef(data)
@@ -738,7 +739,11 @@ export const BillingInfoContainer = React.memo(
738
739
  return false
739
740
  }
740
741
  if (el.name === 'phone') {
741
- el.required = flagRequirePhone
742
+ if (!hidePhoneField) {
743
+ el.required = flagRequirePhone
744
+ } else {
745
+ return false
746
+ }
742
747
  }
743
748
  return true
744
749
  }),
@@ -42,6 +42,7 @@ interface CartSuccess {
42
42
  names_required: boolean;
43
43
  age_required: boolean;
44
44
  phone_required: boolean;
45
+ hide_phone_field: boolean;
45
46
  event_id: string;
46
47
  hash?: string;
47
48
  total?: string;
@@ -294,6 +295,7 @@ export const TicketsContainer = ({
294
295
  const nameIsRequired = pageConfigsData.names_required ?? false
295
296
  const ageIsRequired = pageConfigsData.age_required ?? false
296
297
  const phoneIsRequired = pageConfigsData.phone_required ?? false
298
+ const hidePhoneField = pageConfigsData.hide_phone_field ?? false
297
299
  const hasAddOn = pageConfigsData.has_add_on ?? false
298
300
 
299
301
  let hash = ''
@@ -332,6 +334,7 @@ export const TicketsContainer = ({
332
334
  names_required: nameIsRequired,
333
335
  phone_required: phoneIsRequired,
334
336
  age_required: ageIsRequired,
337
+ hide_phone_field: hidePhoneField,
335
338
  event_id: String(eventId),
336
339
  hash,
337
340
  total,