@@ -37,568 +37,568 @@ |
||
37 | 37 | */ |
38 | 38 | class BillingForm extends EE_Billing_Attendee_Info_Form |
39 | 39 | { |
40 | - protected EE_Payment_Method $paypal_pmt; |
|
41 | - |
|
42 | - protected ?EE_Transaction $transaction = null; |
|
43 | - |
|
44 | - protected string $checkout_type; |
|
45 | - |
|
46 | - /** |
|
47 | - * Filepath to template files |
|
48 | - * |
|
49 | - * @var string $template_path |
|
50 | - */ |
|
51 | - protected string $template_path; |
|
52 | - |
|
53 | - |
|
54 | - /** |
|
55 | - * Class constructor. |
|
56 | - * |
|
57 | - * @param EE_Payment_Method $payment_method |
|
58 | - * @param array $options |
|
59 | - * @throws EE_Error |
|
60 | - * @throws ReflectionException |
|
61 | - */ |
|
62 | - public function __construct(EE_Payment_Method $payment_method, array $options) |
|
63 | - { |
|
64 | - $this->paypal_pmt = $payment_method; |
|
65 | - // Can't be too careful. |
|
66 | - $this->transaction = $options['transaction'] ?? null; |
|
67 | - $this->template_path = $options['template_path'] ?? ''; |
|
68 | - $this->checkout_type = $payment_method->get_extra_meta( |
|
69 | - Domain::META_KEY_CHECKOUT_TYPE, |
|
70 | - true, |
|
71 | - 'express_checkout' |
|
72 | - ); |
|
73 | - $pm_slug = $payment_method->slug(); |
|
74 | - $parameters = array_replace_recursive( |
|
75 | - $options, |
|
76 | - [ |
|
77 | - 'name' => 'PayPalCommerceBillingForm', |
|
78 | - 'html_id' => 'pp-' . $pm_slug . '-billing-form', |
|
79 | - 'html_class' => 'pp_commerce_billing_form', |
|
80 | - 'subsections' => [ |
|
81 | - 'eea_paypal_commerce_token' => new EE_Hidden_Input( |
|
82 | - [ |
|
83 | - 'html_id' => 'eea-paypal-commerce-token', |
|
84 | - 'html_name' => 'EEA_paymentToken', |
|
85 | - 'default' => '', |
|
86 | - ] |
|
87 | - ), |
|
88 | - 'pp_order_nonce' => new EE_Hidden_Input( |
|
89 | - [ |
|
90 | - 'html_id' => 'eea-' . $pm_slug . '-order-nonce', |
|
91 | - 'html_name' => 'pp_order_nonce', |
|
92 | - 'default' => '', |
|
93 | - ] |
|
94 | - ), |
|
95 | - 'pp_order_id' => new EE_Hidden_Input( |
|
96 | - [ |
|
97 | - 'html_id' => 'eea-' . $pm_slug . '-order-id', |
|
98 | - 'html_name' => 'pp_order_id', |
|
99 | - 'default' => '', |
|
100 | - ] |
|
101 | - ), |
|
102 | - 'pp_order_status' => new EE_Hidden_Input( |
|
103 | - [ |
|
104 | - 'html_id' => 'eea-' . $pm_slug . '-order-status', |
|
105 | - 'html_name' => 'pp_order_status', |
|
106 | - 'default' => '', |
|
107 | - ] |
|
108 | - ), |
|
109 | - ], |
|
110 | - ] |
|
111 | - ); |
|
112 | - // Add data tags to the PP script. |
|
113 | - add_filter('script_loader_tag', [$this, 'addDataTagsToScript'], 10, 2); |
|
114 | - parent::__construct($payment_method, $parameters); |
|
115 | - // Add and exclude other sections. |
|
116 | - $this->addPaymentSections(); |
|
117 | - // Additional actions and/or filters. |
|
118 | - $this->loadActionsAndFilters(); |
|
119 | - } |
|
120 | - |
|
121 | - |
|
122 | - /** |
|
123 | - * Add PayPal payment sections. |
|
124 | - * |
|
125 | - * @return void |
|
126 | - * @throws EE_Error |
|
127 | - * @throws ReflectionException |
|
128 | - */ |
|
129 | - public function addPaymentSections(): void |
|
130 | - { |
|
131 | - // Exclude the default billing form fields. |
|
132 | - $this->exclude( |
|
133 | - [ |
|
134 | - 'first_name', |
|
135 | - 'last_name', |
|
136 | - 'email', |
|
137 | - ] |
|
138 | - ); |
|
139 | - // Add PayPal Hosted Fields. |
|
140 | - if (! empty($this->checkout_type) && $this->checkout_type !== 'express_checkout') { |
|
141 | - $this->addAdvancedCardFields(); |
|
142 | - } |
|
143 | - // Add payment types separator, if both are enabled. |
|
144 | - if ($this->checkout_type === 'all') { |
|
145 | - $this->addTypesSeparator(); |
|
146 | - } |
|
147 | - // Add PayPal Buttons section. |
|
148 | - if ($this->checkout_type !== 'ppcp') { |
|
149 | - $this->add_subsections( |
|
150 | - [ |
|
151 | - 'paypal_commerce_pm_form' => $this->addPayPalCheckout(), |
|
152 | - ] |
|
153 | - ); |
|
154 | - } |
|
155 | - // Exclude the rest billing form fields if the payment type is express checkout. |
|
156 | - if ($this->checkout_type === 'express_checkout') { |
|
157 | - $this->exclude( |
|
158 | - [ |
|
159 | - 'address', |
|
160 | - 'address2', |
|
161 | - 'state', |
|
162 | - 'phone', |
|
163 | - 'city', |
|
164 | - 'country', |
|
165 | - 'zip', |
|
166 | - ] |
|
167 | - ); |
|
168 | - // Remove the Info subsection. |
|
169 | - add_filter('FHEE__EE_Form_Section_Proper___construct__options_array', [$this, 'excludeInfoSubsection']); |
|
170 | - } |
|
171 | - $this->add_subsections( |
|
172 | - [ |
|
173 | - 'debug_content' => $this->addDebugContent($this->paypal_pmt), |
|
174 | - ] |
|
175 | - ); |
|
176 | - } |
|
177 | - |
|
178 | - |
|
179 | - /** |
|
180 | - * Additional actions and/or filters. |
|
181 | - * |
|
182 | - * @return void |
|
183 | - */ |
|
184 | - public function loadActionsAndFilters(): void |
|
185 | - { |
|
186 | - add_filter( |
|
187 | - 'FHEE__EE_SPCO_Reg_Step_Payment_Options___get_billing_form_for_payment_method__billing_form', |
|
188 | - [__CLASS__, 'excludeBillingFormFields'], |
|
189 | - 10, |
|
190 | - 2 |
|
191 | - ); |
|
192 | - } |
|
193 | - |
|
194 | - |
|
195 | - /** |
|
196 | - * Filter out billing form fields if pay button was used. |
|
197 | - * |
|
198 | - * @param EE_Billing_Info_Form $billing_form |
|
199 | - * @param EE_Payment_Method $payment_method |
|
200 | - * @return EE_Billing_Info_Form |
|
201 | - */ |
|
202 | - public static function excludeBillingFormFields( |
|
203 | - EE_Billing_Info_Form $billing_form, |
|
204 | - EE_Payment_Method $payment_method |
|
205 | - ): EE_Billing_Info_Form { |
|
206 | - $request = LoaderFactory::getShared(Request::class); |
|
207 | - $request_params = $request->requestParams(); |
|
208 | - // Only the PPC billing form. |
|
209 | - if (! $billing_form instanceof BillingForm) { |
|
210 | - return $billing_form; |
|
211 | - } |
|
212 | - // Make sure the billing form subsections have correct names. |
|
213 | - $inputs = $billing_form->inputs_in_subsections(); |
|
214 | - if ( |
|
215 | - ! empty($request_params['process_form_submission']) |
|
216 | - && $request_params['process_form_submission'] === '1' |
|
217 | - && ! empty($request_params['eep_ppc_skip_form_validation']) |
|
218 | - ) { |
|
219 | - // Hide card info fields. |
|
220 | - $billing_form->exclude( |
|
221 | - [ |
|
222 | - 'pp_name_on_card', |
|
223 | - 'address', |
|
224 | - 'address2', |
|
225 | - 'state', |
|
226 | - 'phone', |
|
227 | - 'city', |
|
228 | - 'country', |
|
229 | - 'zip', |
|
230 | - ] |
|
231 | - ); |
|
232 | - } |
|
233 | - return $billing_form; |
|
234 | - } |
|
235 | - |
|
236 | - |
|
237 | - /** |
|
238 | - * Add advanced card & debit card fields. |
|
239 | - * |
|
240 | - * @return void |
|
241 | - * @throws EE_Error|ReflectionException |
|
242 | - */ |
|
243 | - public function addAdvancedCardFields(): void |
|
244 | - { |
|
245 | - $pm_slug = $this->paypal_pmt->slug(); |
|
246 | - $this->add_subsections( |
|
247 | - [ |
|
248 | - 'pp_card_number' => new EE_Form_Section_HTML( |
|
249 | - EEH_HTML::label( |
|
250 | - esc_html__('Card Number', 'event_espresso'), |
|
251 | - "$pm_slug-card-number-lbl", |
|
252 | - "$pm_slug-card-fields", |
|
253 | - "", |
|
254 | - 'for="' . $pm_slug . '-card-number"' |
|
255 | - ) . |
|
256 | - EEH_HTML::p( |
|
257 | - "", |
|
258 | - "$pm_slug-card-number", |
|
259 | - "card_field $pm_slug-card-fields" |
|
260 | - ) |
|
261 | - ), |
|
262 | - 'pp_expiration_date' => new EE_Form_Section_HTML( |
|
263 | - EEH_HTML::label( |
|
264 | - esc_html__('Expiration Date', 'event_espresso'), |
|
265 | - "$pm_slug-expiration-date-lbl", |
|
266 | - "$pm_slug-card-fields", |
|
267 | - "", |
|
268 | - 'for="' . $pm_slug . '-expiration-date"' |
|
269 | - ) . |
|
270 | - EEH_HTML::p( |
|
271 | - "", |
|
272 | - "$pm_slug-expiration-date", |
|
273 | - "card_field $pm_slug-card-fields" |
|
274 | - ) |
|
275 | - ), |
|
276 | - 'pp_card_cvv' => new EE_Form_Section_HTML( |
|
277 | - EEH_HTML::label( |
|
278 | - esc_html__('CVV', 'event_espresso'), |
|
279 | - "$pm_slug-cvv-lbl", |
|
280 | - "$pm_slug-card-fields", |
|
281 | - "", |
|
282 | - 'for="' . $pm_slug . '-cvv"' |
|
283 | - ) . |
|
284 | - EEH_HTML::p( |
|
285 | - "", |
|
286 | - "$pm_slug-cvv", |
|
287 | - "card_field $pm_slug-card-fields" |
|
288 | - ) |
|
289 | - ), |
|
290 | - 'pp_name_on_card' => new EE_Text_Input( |
|
291 | - [ |
|
292 | - 'html_label_text' => esc_html__('Name On Card', 'event_espresso'), |
|
293 | - 'html_id' => $pm_slug . '-card-holder-name', |
|
294 | - 'html_name' => 'card-holder-name', |
|
295 | - 'html_class' => '', |
|
296 | - 'required' => true, |
|
297 | - ] |
|
298 | - ), |
|
299 | - ] |
|
300 | - ); |
|
301 | - // Add the submit button at the end. |
|
302 | - $this->add_subsections( |
|
303 | - [ |
|
304 | - 'pp_cc_submit' => new EE_Submit_Input( |
|
305 | - [ |
|
306 | - 'html_label_text' => esc_html__('Submit', 'event_espresso'), |
|
307 | - 'html_id' => $pm_slug, |
|
308 | - 'html_class' => 'eep-ppc-btn', |
|
309 | - ] |
|
310 | - ), |
|
311 | - ], |
|
312 | - 'phone', |
|
313 | - false |
|
314 | - ); |
|
315 | - } |
|
316 | - |
|
317 | - |
|
318 | - /** |
|
319 | - * Add advanced card & debit card fields. |
|
320 | - * |
|
321 | - * @return void |
|
322 | - * @throws EE_Error|ReflectionException |
|
323 | - */ |
|
324 | - public function addTypesSeparator(): void |
|
325 | - { |
|
326 | - $this->add_subsections( |
|
327 | - [ |
|
328 | - 'pp_payment_types_separator' => new EE_Form_Section_HTML( |
|
329 | - EEH_HTML::div( |
|
330 | - EEH_HTML::div( |
|
331 | - ' ', |
|
332 | - 'eep-' . $this->paypal_pmt->slug() . '-payments-separator', |
|
333 | - 'eep-ppc-separator-line eep-left-floating' |
|
334 | - ) . |
|
335 | - EEH_HTML::div( |
|
336 | - esc_html__(' or ', 'event_espresso'), |
|
337 | - 'eep-' . $this->paypal_pmt->slug() . '-separator-text', |
|
338 | - 'eep-ppc-separator-text1 eep-mid-floating' |
|
339 | - ) . EEH_HTML::div( |
|
340 | - ' ', |
|
341 | - 'eep-' . $this->paypal_pmt->slug() . '-payments-separator', |
|
342 | - 'eep-ppc-separator-line eep-right-floating' |
|
343 | - ), |
|
344 | - 'eep-ppc-separator-holder', |
|
345 | - 'eep-ppc-separator-holder' |
|
346 | - ) |
|
347 | - ), |
|
348 | - ] |
|
349 | - ); |
|
350 | - } |
|
351 | - |
|
352 | - |
|
353 | - /** |
|
354 | - * Exclude the info subsection from the PPC checkout form. |
|
355 | - * |
|
356 | - * @param array $options_array |
|
357 | - * @return array |
|
358 | - * @throws EE_Error |
|
359 | - * @throws ReflectionException |
|
360 | - */ |
|
361 | - public function excludeInfoSubsection(array $options_array): array |
|
362 | - { |
|
363 | - if ( |
|
364 | - ! empty($options_array['html_id']) |
|
365 | - && $options_array['html_id'] === 'spco-payment-method-info-' . $this->paypal_pmt->slug() |
|
366 | - ) { |
|
367 | - if (! empty($options_array['subsections']) && isset($options_array['subsections']['info'])) { |
|
368 | - unset($options_array['subsections']['info']); |
|
369 | - } |
|
370 | - } |
|
371 | - return $options_array; |
|
372 | - } |
|
373 | - |
|
374 | - |
|
375 | - /** |
|
376 | - * Possibly adds debug content to PayPal commerce billing form. |
|
377 | - * |
|
378 | - * @param EE_Payment_Method $paypal_pm |
|
379 | - * @return EE_Form_Section_Base |
|
380 | - * @throws EE_Error|ReflectionException |
|
381 | - */ |
|
382 | - public function addDebugContent(EE_Payment_Method $paypal_pm): EE_Form_Section_Base |
|
383 | - { |
|
384 | - if ($paypal_pm->debug_mode()) { |
|
385 | - return new EE_Form_Section_Proper( |
|
386 | - [ |
|
387 | - 'layout_strategy' => new EE_Template_Layout( |
|
388 | - [ |
|
389 | - 'layout_template_file' => $this->template_path . 'debugInfo.template.php', |
|
390 | - 'template_args' => [], |
|
391 | - ] |
|
392 | - ), |
|
393 | - ] |
|
394 | - ); |
|
395 | - } |
|
396 | - return new EE_Form_Section_HTML(); |
|
397 | - } |
|
398 | - |
|
399 | - |
|
400 | - /** |
|
401 | - * Add PayPal checkout buttons. |
|
402 | - * |
|
403 | - * @return EE_Form_Section_Proper |
|
404 | - * @throws EE_Error |
|
405 | - * @throws ReflectionException |
|
406 | - * @throws Exception |
|
407 | - */ |
|
408 | - public function addPayPalCheckout(): EE_Form_Section_Proper |
|
409 | - { |
|
410 | - $template_args['pm_slug'] = $this->paypal_pmt->slug(); |
|
411 | - return new EE_Form_Section_Proper( |
|
412 | - [ |
|
413 | - 'layout_strategy' => new EE_Template_Layout( |
|
414 | - [ |
|
415 | - 'layout_template_file' => $this->template_path . 'paymentButtons.template.php', |
|
416 | - 'template_args' => $template_args, |
|
417 | - ] |
|
418 | - ), |
|
419 | - ] |
|
420 | - ); |
|
421 | - } |
|
422 | - |
|
423 | - |
|
424 | - /** |
|
425 | - * Load scripts and localize data needed for this form. |
|
426 | - * |
|
427 | - * @param $tag |
|
428 | - * @param $handle |
|
429 | - * @return string |
|
430 | - * @throws EE_Error |
|
431 | - * @throws ReflectionException |
|
432 | - */ |
|
433 | - public function addDataTagsToScript($tag, $handle): string |
|
434 | - { |
|
435 | - if ($handle === 'eea_paypal_commerce_js_lib') { |
|
436 | - $bn_code = PayPalExtraMetaManager::getPmOption($this->_pm_instance, Domain::META_KEY_BN_CODE); |
|
437 | - $response = EED_PayPalCommerce::requestClientToken($this->paypal_pmt); |
|
438 | - if (empty($response['client_token'])) { |
|
439 | - return $tag; |
|
440 | - } |
|
441 | - $client_token = $response['client_token']; |
|
442 | - $attributes = " data-partner-attribution-id=\"$bn_code\" data-client-token=\"$client_token\""; |
|
443 | - $tag = str_replace('></script>', $attributes . '></script>', $tag); |
|
444 | - } |
|
445 | - return $tag; |
|
446 | - } |
|
447 | - |
|
448 | - |
|
449 | - /** |
|
450 | - * Load scripts and localize data needed for this form. |
|
451 | - * |
|
452 | - * @return void |
|
453 | - * @throws EE_Error |
|
454 | - * @throws ReflectionException |
|
455 | - * @throws Exception |
|
456 | - */ |
|
457 | - public function enqueue_js(): void |
|
458 | - { |
|
459 | - // Setup default values |
|
460 | - $client_id_key = Domain::META_KEY_CLIENT_ID; |
|
461 | - $merchant_id = false; |
|
462 | - $funding_options = ['venmo', 'paylater']; |
|
463 | - |
|
464 | - // Override the above if thrid party integration |
|
465 | - if (EED_PayPalCommerce::isThirdParty($this->_pm_instance)) { |
|
466 | - $client_id_key = Domain::META_KEY_PARTNER_CLIENT_ID; |
|
467 | - $merchant_id = PayPalExtraMetaManager::getPmOption( |
|
468 | - $this->_pm_instance, |
|
469 | - Domain::META_KEY_SELLER_MERCHANT_ID |
|
470 | - ); |
|
471 | - } |
|
472 | - |
|
473 | - // Setup query args |
|
474 | - $url_params = [ |
|
475 | - 'client-id' => PayPalExtraMetaManager::getPmOption($this->_pm_instance, $client_id_key), |
|
476 | - 'currency' => CurrencyManager::currencyCode(), |
|
477 | - 'components' => implode(',', ['buttons','hosted-fields']), |
|
478 | - 'intent' => 'capture', |
|
479 | - 'merchant-id' => $merchant_id, |
|
480 | - ]; |
|
481 | - |
|
482 | - // Which funding methods are active? |
|
483 | - $enabled_funding = $this->_pm_instance->get_extra_meta(Domain::META_KEY_FUNDING_OPTIONS, true, $funding_options); |
|
484 | - |
|
485 | - // Any funding method not enabled should be disabled. |
|
486 | - $disabled_funding = array_diff( |
|
487 | - $funding_options, |
|
488 | - $enabled_funding |
|
489 | - ); |
|
490 | - |
|
491 | - // Any funding options enabled? |
|
492 | - if (count($enabled_funding) > 0) { |
|
493 | - $url_params['enable-funding'] = implode(',', $enabled_funding); |
|
494 | - } |
|
495 | - |
|
496 | - // Any funding options disabled? |
|
497 | - if (count($disabled_funding) > 0) { |
|
498 | - $url_params['disable-funding'] = implode(',', $disabled_funding); |
|
499 | - } |
|
500 | - |
|
501 | - // Enqueue the PayPal JS |
|
502 | - wp_enqueue_script( |
|
503 | - 'eea_paypal_commerce_js_lib', |
|
504 | - add_query_arg($url_params, 'https://www.paypal.com/sdk/js'), |
|
505 | - [], |
|
506 | - null |
|
507 | - ); |
|
508 | - |
|
509 | - wp_enqueue_script( |
|
510 | - 'eea_paypal_commerce_js', |
|
511 | - EEP_PAYPAL_COMMERCE_URL . 'assets/js/paypal-commerce-payments.js', |
|
512 | - ['eea_paypal_commerce_js_lib'], |
|
513 | - EVENT_ESPRESSO_VERSION, |
|
514 | - true |
|
515 | - ); |
|
516 | - // Styles. |
|
517 | - wp_enqueue_style( |
|
518 | - 'eea_paypal_checkout_form_styles', |
|
519 | - EEP_PAYPAL_COMMERCE_URL . 'assets' . DS . 'css' . DS . 'eea-paypal-checkout.css', |
|
520 | - [], |
|
521 | - EVENT_ESPRESSO_VERSION |
|
522 | - ); |
|
523 | - // Localize the script with our transaction data. |
|
524 | - $parameters = $this->localizeParameters(); |
|
525 | - wp_localize_script('eea_paypal_commerce_js', 'eeaPPCommerceParameters', $parameters); |
|
526 | - parent::enqueue_js(); |
|
527 | - } |
|
528 | - |
|
529 | - |
|
530 | - /** |
|
531 | - * Form and return PayPal commerce parameters for script localization. |
|
532 | - * |
|
533 | - * @return array |
|
534 | - * @throws EE_Error |
|
535 | - * @throws ReflectionException |
|
536 | - * @throws Exception |
|
537 | - */ |
|
538 | - public function localizeParameters(): array |
|
539 | - { |
|
540 | - // Also tell the script about each instance of this PM. |
|
541 | - $pm_versions = []; |
|
542 | - $active_payment_methods = EEM_Payment_Method::instance()->get_all_active( |
|
543 | - EEM_Payment_Method::scope_cart, |
|
544 | - [['PMD_slug' => ['LIKE', '%paypalcheckout%']]] |
|
545 | - ); |
|
546 | - foreach ($active_payment_methods as $payment_method) { |
|
547 | - $pm_versions[ $payment_method->slug() ] = [ |
|
548 | - 'pm_slug' => $payment_method->slug(), |
|
549 | - ]; |
|
550 | - } |
|
551 | - // Convert money for a display format. |
|
552 | - $decimal_places = CurrencyManager::getDecimalPlaces(); |
|
553 | - $org_country = isset(EE_Registry::instance()->CFG->organization) |
|
554 | - && EE_Registry::instance()->CFG->organization instanceof EE_Organization_Config |
|
555 | - ? EE_Registry::instance()->CFG->organization->CNT_ISO |
|
556 | - : 'US'; |
|
557 | - $transaction_id = $this->transaction instanceof EE_Transaction ? $this->transaction->ID() : 0; |
|
558 | - $currency_code = CurrencyManager::currencyCode(); |
|
559 | - return [ |
|
560 | - 'pm_versions' => $pm_versions, |
|
561 | - 'payment_currency' => $currency_code, |
|
562 | - 'checkout_type' => $this->checkout_type, |
|
563 | - 'currency_sign' => EE_Registry::instance()->CFG->currency->sign, |
|
564 | - 'pp_order_nonce' => wp_create_nonce(Domain::CAPTURE_ORDER_NONCE_NAME), |
|
565 | - // The transaction ID is only used for logging errors. |
|
566 | - 'txn_id' => $transaction_id, |
|
567 | - 'org_country' => $org_country, |
|
568 | - 'decimal_places' => $decimal_places, |
|
569 | - 'site_name' => get_bloginfo('name'), |
|
570 | - 'active_states' => EED_PayPalCommerce::getActiveStates(), |
|
571 | - 'no_spco_error' => esc_html__( |
|
572 | - 'It appears the SDK script was not loaded properly! Please refresh the page and try again or contact support.', |
|
573 | - 'event_espresso' |
|
574 | - ), |
|
575 | - 'no_pm_error' => esc_html__( |
|
576 | - 'It appears that PayPal Commerce checkout JavaScript was not loaded properly! Please refresh the page and try again or contact support. PayPal Commerce payments can\'t be processed.', |
|
577 | - 'event_espresso' |
|
578 | - ), |
|
579 | - 'browser_not_supported' => esc_html__( |
|
580 | - 'It appears that this browser is not supported by PayPal scripts. We apologize, but PayPal payments won\'t work in this browser version.', |
|
581 | - 'event_espresso' |
|
582 | - ), |
|
583 | - 'get_token_error' => esc_html__( |
|
584 | - 'There was an error while trying to get the payment token. Please refresh the page and try again or contact support.', |
|
585 | - 'event_espresso' |
|
586 | - ), |
|
587 | - 'form_validation_notice' => esc_html__('Billing form information not valid.', 'event_espresso'), |
|
588 | - 'no_verification_token' => esc_html__('Missing the Verification token.', 'event_espresso'), |
|
589 | - 'error_response' => esc_html__('Error response received', 'event_espresso'), |
|
590 | - 'payment_error' => esc_html__( |
|
591 | - 'There was an error with this payment. See the logs for details.', |
|
592 | - 'event_espresso' |
|
593 | - ), |
|
594 | - 'no_order_id' => esc_html__('No Order ID found.', 'event_espresso'), |
|
595 | - 'general_pp_error' => esc_html__('PayPal form threw an error.', 'event_espresso'), |
|
596 | - 'hf_render_error' => esc_html__('Hosted fields could not be rendered!', 'event_espresso'), |
|
597 | - 'pm_capture_error' => esc_html__('Payment could not be captured!', 'event_espresso'), |
|
598 | - 'not_acdc_eligible' => esc_html__( |
|
599 | - 'This merchant is not eligible for Advanced Card Fields checkout type.', |
|
600 | - 'event_espresso' |
|
601 | - ), |
|
602 | - ]; |
|
603 | - } |
|
40 | + protected EE_Payment_Method $paypal_pmt; |
|
41 | + |
|
42 | + protected ?EE_Transaction $transaction = null; |
|
43 | + |
|
44 | + protected string $checkout_type; |
|
45 | + |
|
46 | + /** |
|
47 | + * Filepath to template files |
|
48 | + * |
|
49 | + * @var string $template_path |
|
50 | + */ |
|
51 | + protected string $template_path; |
|
52 | + |
|
53 | + |
|
54 | + /** |
|
55 | + * Class constructor. |
|
56 | + * |
|
57 | + * @param EE_Payment_Method $payment_method |
|
58 | + * @param array $options |
|
59 | + * @throws EE_Error |
|
60 | + * @throws ReflectionException |
|
61 | + */ |
|
62 | + public function __construct(EE_Payment_Method $payment_method, array $options) |
|
63 | + { |
|
64 | + $this->paypal_pmt = $payment_method; |
|
65 | + // Can't be too careful. |
|
66 | + $this->transaction = $options['transaction'] ?? null; |
|
67 | + $this->template_path = $options['template_path'] ?? ''; |
|
68 | + $this->checkout_type = $payment_method->get_extra_meta( |
|
69 | + Domain::META_KEY_CHECKOUT_TYPE, |
|
70 | + true, |
|
71 | + 'express_checkout' |
|
72 | + ); |
|
73 | + $pm_slug = $payment_method->slug(); |
|
74 | + $parameters = array_replace_recursive( |
|
75 | + $options, |
|
76 | + [ |
|
77 | + 'name' => 'PayPalCommerceBillingForm', |
|
78 | + 'html_id' => 'pp-' . $pm_slug . '-billing-form', |
|
79 | + 'html_class' => 'pp_commerce_billing_form', |
|
80 | + 'subsections' => [ |
|
81 | + 'eea_paypal_commerce_token' => new EE_Hidden_Input( |
|
82 | + [ |
|
83 | + 'html_id' => 'eea-paypal-commerce-token', |
|
84 | + 'html_name' => 'EEA_paymentToken', |
|
85 | + 'default' => '', |
|
86 | + ] |
|
87 | + ), |
|
88 | + 'pp_order_nonce' => new EE_Hidden_Input( |
|
89 | + [ |
|
90 | + 'html_id' => 'eea-' . $pm_slug . '-order-nonce', |
|
91 | + 'html_name' => 'pp_order_nonce', |
|
92 | + 'default' => '', |
|
93 | + ] |
|
94 | + ), |
|
95 | + 'pp_order_id' => new EE_Hidden_Input( |
|
96 | + [ |
|
97 | + 'html_id' => 'eea-' . $pm_slug . '-order-id', |
|
98 | + 'html_name' => 'pp_order_id', |
|
99 | + 'default' => '', |
|
100 | + ] |
|
101 | + ), |
|
102 | + 'pp_order_status' => new EE_Hidden_Input( |
|
103 | + [ |
|
104 | + 'html_id' => 'eea-' . $pm_slug . '-order-status', |
|
105 | + 'html_name' => 'pp_order_status', |
|
106 | + 'default' => '', |
|
107 | + ] |
|
108 | + ), |
|
109 | + ], |
|
110 | + ] |
|
111 | + ); |
|
112 | + // Add data tags to the PP script. |
|
113 | + add_filter('script_loader_tag', [$this, 'addDataTagsToScript'], 10, 2); |
|
114 | + parent::__construct($payment_method, $parameters); |
|
115 | + // Add and exclude other sections. |
|
116 | + $this->addPaymentSections(); |
|
117 | + // Additional actions and/or filters. |
|
118 | + $this->loadActionsAndFilters(); |
|
119 | + } |
|
120 | + |
|
121 | + |
|
122 | + /** |
|
123 | + * Add PayPal payment sections. |
|
124 | + * |
|
125 | + * @return void |
|
126 | + * @throws EE_Error |
|
127 | + * @throws ReflectionException |
|
128 | + */ |
|
129 | + public function addPaymentSections(): void |
|
130 | + { |
|
131 | + // Exclude the default billing form fields. |
|
132 | + $this->exclude( |
|
133 | + [ |
|
134 | + 'first_name', |
|
135 | + 'last_name', |
|
136 | + 'email', |
|
137 | + ] |
|
138 | + ); |
|
139 | + // Add PayPal Hosted Fields. |
|
140 | + if (! empty($this->checkout_type) && $this->checkout_type !== 'express_checkout') { |
|
141 | + $this->addAdvancedCardFields(); |
|
142 | + } |
|
143 | + // Add payment types separator, if both are enabled. |
|
144 | + if ($this->checkout_type === 'all') { |
|
145 | + $this->addTypesSeparator(); |
|
146 | + } |
|
147 | + // Add PayPal Buttons section. |
|
148 | + if ($this->checkout_type !== 'ppcp') { |
|
149 | + $this->add_subsections( |
|
150 | + [ |
|
151 | + 'paypal_commerce_pm_form' => $this->addPayPalCheckout(), |
|
152 | + ] |
|
153 | + ); |
|
154 | + } |
|
155 | + // Exclude the rest billing form fields if the payment type is express checkout. |
|
156 | + if ($this->checkout_type === 'express_checkout') { |
|
157 | + $this->exclude( |
|
158 | + [ |
|
159 | + 'address', |
|
160 | + 'address2', |
|
161 | + 'state', |
|
162 | + 'phone', |
|
163 | + 'city', |
|
164 | + 'country', |
|
165 | + 'zip', |
|
166 | + ] |
|
167 | + ); |
|
168 | + // Remove the Info subsection. |
|
169 | + add_filter('FHEE__EE_Form_Section_Proper___construct__options_array', [$this, 'excludeInfoSubsection']); |
|
170 | + } |
|
171 | + $this->add_subsections( |
|
172 | + [ |
|
173 | + 'debug_content' => $this->addDebugContent($this->paypal_pmt), |
|
174 | + ] |
|
175 | + ); |
|
176 | + } |
|
177 | + |
|
178 | + |
|
179 | + /** |
|
180 | + * Additional actions and/or filters. |
|
181 | + * |
|
182 | + * @return void |
|
183 | + */ |
|
184 | + public function loadActionsAndFilters(): void |
|
185 | + { |
|
186 | + add_filter( |
|
187 | + 'FHEE__EE_SPCO_Reg_Step_Payment_Options___get_billing_form_for_payment_method__billing_form', |
|
188 | + [__CLASS__, 'excludeBillingFormFields'], |
|
189 | + 10, |
|
190 | + 2 |
|
191 | + ); |
|
192 | + } |
|
193 | + |
|
194 | + |
|
195 | + /** |
|
196 | + * Filter out billing form fields if pay button was used. |
|
197 | + * |
|
198 | + * @param EE_Billing_Info_Form $billing_form |
|
199 | + * @param EE_Payment_Method $payment_method |
|
200 | + * @return EE_Billing_Info_Form |
|
201 | + */ |
|
202 | + public static function excludeBillingFormFields( |
|
203 | + EE_Billing_Info_Form $billing_form, |
|
204 | + EE_Payment_Method $payment_method |
|
205 | + ): EE_Billing_Info_Form { |
|
206 | + $request = LoaderFactory::getShared(Request::class); |
|
207 | + $request_params = $request->requestParams(); |
|
208 | + // Only the PPC billing form. |
|
209 | + if (! $billing_form instanceof BillingForm) { |
|
210 | + return $billing_form; |
|
211 | + } |
|
212 | + // Make sure the billing form subsections have correct names. |
|
213 | + $inputs = $billing_form->inputs_in_subsections(); |
|
214 | + if ( |
|
215 | + ! empty($request_params['process_form_submission']) |
|
216 | + && $request_params['process_form_submission'] === '1' |
|
217 | + && ! empty($request_params['eep_ppc_skip_form_validation']) |
|
218 | + ) { |
|
219 | + // Hide card info fields. |
|
220 | + $billing_form->exclude( |
|
221 | + [ |
|
222 | + 'pp_name_on_card', |
|
223 | + 'address', |
|
224 | + 'address2', |
|
225 | + 'state', |
|
226 | + 'phone', |
|
227 | + 'city', |
|
228 | + 'country', |
|
229 | + 'zip', |
|
230 | + ] |
|
231 | + ); |
|
232 | + } |
|
233 | + return $billing_form; |
|
234 | + } |
|
235 | + |
|
236 | + |
|
237 | + /** |
|
238 | + * Add advanced card & debit card fields. |
|
239 | + * |
|
240 | + * @return void |
|
241 | + * @throws EE_Error|ReflectionException |
|
242 | + */ |
|
243 | + public function addAdvancedCardFields(): void |
|
244 | + { |
|
245 | + $pm_slug = $this->paypal_pmt->slug(); |
|
246 | + $this->add_subsections( |
|
247 | + [ |
|
248 | + 'pp_card_number' => new EE_Form_Section_HTML( |
|
249 | + EEH_HTML::label( |
|
250 | + esc_html__('Card Number', 'event_espresso'), |
|
251 | + "$pm_slug-card-number-lbl", |
|
252 | + "$pm_slug-card-fields", |
|
253 | + "", |
|
254 | + 'for="' . $pm_slug . '-card-number"' |
|
255 | + ) . |
|
256 | + EEH_HTML::p( |
|
257 | + "", |
|
258 | + "$pm_slug-card-number", |
|
259 | + "card_field $pm_slug-card-fields" |
|
260 | + ) |
|
261 | + ), |
|
262 | + 'pp_expiration_date' => new EE_Form_Section_HTML( |
|
263 | + EEH_HTML::label( |
|
264 | + esc_html__('Expiration Date', 'event_espresso'), |
|
265 | + "$pm_slug-expiration-date-lbl", |
|
266 | + "$pm_slug-card-fields", |
|
267 | + "", |
|
268 | + 'for="' . $pm_slug . '-expiration-date"' |
|
269 | + ) . |
|
270 | + EEH_HTML::p( |
|
271 | + "", |
|
272 | + "$pm_slug-expiration-date", |
|
273 | + "card_field $pm_slug-card-fields" |
|
274 | + ) |
|
275 | + ), |
|
276 | + 'pp_card_cvv' => new EE_Form_Section_HTML( |
|
277 | + EEH_HTML::label( |
|
278 | + esc_html__('CVV', 'event_espresso'), |
|
279 | + "$pm_slug-cvv-lbl", |
|
280 | + "$pm_slug-card-fields", |
|
281 | + "", |
|
282 | + 'for="' . $pm_slug . '-cvv"' |
|
283 | + ) . |
|
284 | + EEH_HTML::p( |
|
285 | + "", |
|
286 | + "$pm_slug-cvv", |
|
287 | + "card_field $pm_slug-card-fields" |
|
288 | + ) |
|
289 | + ), |
|
290 | + 'pp_name_on_card' => new EE_Text_Input( |
|
291 | + [ |
|
292 | + 'html_label_text' => esc_html__('Name On Card', 'event_espresso'), |
|
293 | + 'html_id' => $pm_slug . '-card-holder-name', |
|
294 | + 'html_name' => 'card-holder-name', |
|
295 | + 'html_class' => '', |
|
296 | + 'required' => true, |
|
297 | + ] |
|
298 | + ), |
|
299 | + ] |
|
300 | + ); |
|
301 | + // Add the submit button at the end. |
|
302 | + $this->add_subsections( |
|
303 | + [ |
|
304 | + 'pp_cc_submit' => new EE_Submit_Input( |
|
305 | + [ |
|
306 | + 'html_label_text' => esc_html__('Submit', 'event_espresso'), |
|
307 | + 'html_id' => $pm_slug, |
|
308 | + 'html_class' => 'eep-ppc-btn', |
|
309 | + ] |
|
310 | + ), |
|
311 | + ], |
|
312 | + 'phone', |
|
313 | + false |
|
314 | + ); |
|
315 | + } |
|
316 | + |
|
317 | + |
|
318 | + /** |
|
319 | + * Add advanced card & debit card fields. |
|
320 | + * |
|
321 | + * @return void |
|
322 | + * @throws EE_Error|ReflectionException |
|
323 | + */ |
|
324 | + public function addTypesSeparator(): void |
|
325 | + { |
|
326 | + $this->add_subsections( |
|
327 | + [ |
|
328 | + 'pp_payment_types_separator' => new EE_Form_Section_HTML( |
|
329 | + EEH_HTML::div( |
|
330 | + EEH_HTML::div( |
|
331 | + ' ', |
|
332 | + 'eep-' . $this->paypal_pmt->slug() . '-payments-separator', |
|
333 | + 'eep-ppc-separator-line eep-left-floating' |
|
334 | + ) . |
|
335 | + EEH_HTML::div( |
|
336 | + esc_html__(' or ', 'event_espresso'), |
|
337 | + 'eep-' . $this->paypal_pmt->slug() . '-separator-text', |
|
338 | + 'eep-ppc-separator-text1 eep-mid-floating' |
|
339 | + ) . EEH_HTML::div( |
|
340 | + ' ', |
|
341 | + 'eep-' . $this->paypal_pmt->slug() . '-payments-separator', |
|
342 | + 'eep-ppc-separator-line eep-right-floating' |
|
343 | + ), |
|
344 | + 'eep-ppc-separator-holder', |
|
345 | + 'eep-ppc-separator-holder' |
|
346 | + ) |
|
347 | + ), |
|
348 | + ] |
|
349 | + ); |
|
350 | + } |
|
351 | + |
|
352 | + |
|
353 | + /** |
|
354 | + * Exclude the info subsection from the PPC checkout form. |
|
355 | + * |
|
356 | + * @param array $options_array |
|
357 | + * @return array |
|
358 | + * @throws EE_Error |
|
359 | + * @throws ReflectionException |
|
360 | + */ |
|
361 | + public function excludeInfoSubsection(array $options_array): array |
|
362 | + { |
|
363 | + if ( |
|
364 | + ! empty($options_array['html_id']) |
|
365 | + && $options_array['html_id'] === 'spco-payment-method-info-' . $this->paypal_pmt->slug() |
|
366 | + ) { |
|
367 | + if (! empty($options_array['subsections']) && isset($options_array['subsections']['info'])) { |
|
368 | + unset($options_array['subsections']['info']); |
|
369 | + } |
|
370 | + } |
|
371 | + return $options_array; |
|
372 | + } |
|
373 | + |
|
374 | + |
|
375 | + /** |
|
376 | + * Possibly adds debug content to PayPal commerce billing form. |
|
377 | + * |
|
378 | + * @param EE_Payment_Method $paypal_pm |
|
379 | + * @return EE_Form_Section_Base |
|
380 | + * @throws EE_Error|ReflectionException |
|
381 | + */ |
|
382 | + public function addDebugContent(EE_Payment_Method $paypal_pm): EE_Form_Section_Base |
|
383 | + { |
|
384 | + if ($paypal_pm->debug_mode()) { |
|
385 | + return new EE_Form_Section_Proper( |
|
386 | + [ |
|
387 | + 'layout_strategy' => new EE_Template_Layout( |
|
388 | + [ |
|
389 | + 'layout_template_file' => $this->template_path . 'debugInfo.template.php', |
|
390 | + 'template_args' => [], |
|
391 | + ] |
|
392 | + ), |
|
393 | + ] |
|
394 | + ); |
|
395 | + } |
|
396 | + return new EE_Form_Section_HTML(); |
|
397 | + } |
|
398 | + |
|
399 | + |
|
400 | + /** |
|
401 | + * Add PayPal checkout buttons. |
|
402 | + * |
|
403 | + * @return EE_Form_Section_Proper |
|
404 | + * @throws EE_Error |
|
405 | + * @throws ReflectionException |
|
406 | + * @throws Exception |
|
407 | + */ |
|
408 | + public function addPayPalCheckout(): EE_Form_Section_Proper |
|
409 | + { |
|
410 | + $template_args['pm_slug'] = $this->paypal_pmt->slug(); |
|
411 | + return new EE_Form_Section_Proper( |
|
412 | + [ |
|
413 | + 'layout_strategy' => new EE_Template_Layout( |
|
414 | + [ |
|
415 | + 'layout_template_file' => $this->template_path . 'paymentButtons.template.php', |
|
416 | + 'template_args' => $template_args, |
|
417 | + ] |
|
418 | + ), |
|
419 | + ] |
|
420 | + ); |
|
421 | + } |
|
422 | + |
|
423 | + |
|
424 | + /** |
|
425 | + * Load scripts and localize data needed for this form. |
|
426 | + * |
|
427 | + * @param $tag |
|
428 | + * @param $handle |
|
429 | + * @return string |
|
430 | + * @throws EE_Error |
|
431 | + * @throws ReflectionException |
|
432 | + */ |
|
433 | + public function addDataTagsToScript($tag, $handle): string |
|
434 | + { |
|
435 | + if ($handle === 'eea_paypal_commerce_js_lib') { |
|
436 | + $bn_code = PayPalExtraMetaManager::getPmOption($this->_pm_instance, Domain::META_KEY_BN_CODE); |
|
437 | + $response = EED_PayPalCommerce::requestClientToken($this->paypal_pmt); |
|
438 | + if (empty($response['client_token'])) { |
|
439 | + return $tag; |
|
440 | + } |
|
441 | + $client_token = $response['client_token']; |
|
442 | + $attributes = " data-partner-attribution-id=\"$bn_code\" data-client-token=\"$client_token\""; |
|
443 | + $tag = str_replace('></script>', $attributes . '></script>', $tag); |
|
444 | + } |
|
445 | + return $tag; |
|
446 | + } |
|
447 | + |
|
448 | + |
|
449 | + /** |
|
450 | + * Load scripts and localize data needed for this form. |
|
451 | + * |
|
452 | + * @return void |
|
453 | + * @throws EE_Error |
|
454 | + * @throws ReflectionException |
|
455 | + * @throws Exception |
|
456 | + */ |
|
457 | + public function enqueue_js(): void |
|
458 | + { |
|
459 | + // Setup default values |
|
460 | + $client_id_key = Domain::META_KEY_CLIENT_ID; |
|
461 | + $merchant_id = false; |
|
462 | + $funding_options = ['venmo', 'paylater']; |
|
463 | + |
|
464 | + // Override the above if thrid party integration |
|
465 | + if (EED_PayPalCommerce::isThirdParty($this->_pm_instance)) { |
|
466 | + $client_id_key = Domain::META_KEY_PARTNER_CLIENT_ID; |
|
467 | + $merchant_id = PayPalExtraMetaManager::getPmOption( |
|
468 | + $this->_pm_instance, |
|
469 | + Domain::META_KEY_SELLER_MERCHANT_ID |
|
470 | + ); |
|
471 | + } |
|
472 | + |
|
473 | + // Setup query args |
|
474 | + $url_params = [ |
|
475 | + 'client-id' => PayPalExtraMetaManager::getPmOption($this->_pm_instance, $client_id_key), |
|
476 | + 'currency' => CurrencyManager::currencyCode(), |
|
477 | + 'components' => implode(',', ['buttons','hosted-fields']), |
|
478 | + 'intent' => 'capture', |
|
479 | + 'merchant-id' => $merchant_id, |
|
480 | + ]; |
|
481 | + |
|
482 | + // Which funding methods are active? |
|
483 | + $enabled_funding = $this->_pm_instance->get_extra_meta(Domain::META_KEY_FUNDING_OPTIONS, true, $funding_options); |
|
484 | + |
|
485 | + // Any funding method not enabled should be disabled. |
|
486 | + $disabled_funding = array_diff( |
|
487 | + $funding_options, |
|
488 | + $enabled_funding |
|
489 | + ); |
|
490 | + |
|
491 | + // Any funding options enabled? |
|
492 | + if (count($enabled_funding) > 0) { |
|
493 | + $url_params['enable-funding'] = implode(',', $enabled_funding); |
|
494 | + } |
|
495 | + |
|
496 | + // Any funding options disabled? |
|
497 | + if (count($disabled_funding) > 0) { |
|
498 | + $url_params['disable-funding'] = implode(',', $disabled_funding); |
|
499 | + } |
|
500 | + |
|
501 | + // Enqueue the PayPal JS |
|
502 | + wp_enqueue_script( |
|
503 | + 'eea_paypal_commerce_js_lib', |
|
504 | + add_query_arg($url_params, 'https://www.paypal.com/sdk/js'), |
|
505 | + [], |
|
506 | + null |
|
507 | + ); |
|
508 | + |
|
509 | + wp_enqueue_script( |
|
510 | + 'eea_paypal_commerce_js', |
|
511 | + EEP_PAYPAL_COMMERCE_URL . 'assets/js/paypal-commerce-payments.js', |
|
512 | + ['eea_paypal_commerce_js_lib'], |
|
513 | + EVENT_ESPRESSO_VERSION, |
|
514 | + true |
|
515 | + ); |
|
516 | + // Styles. |
|
517 | + wp_enqueue_style( |
|
518 | + 'eea_paypal_checkout_form_styles', |
|
519 | + EEP_PAYPAL_COMMERCE_URL . 'assets' . DS . 'css' . DS . 'eea-paypal-checkout.css', |
|
520 | + [], |
|
521 | + EVENT_ESPRESSO_VERSION |
|
522 | + ); |
|
523 | + // Localize the script with our transaction data. |
|
524 | + $parameters = $this->localizeParameters(); |
|
525 | + wp_localize_script('eea_paypal_commerce_js', 'eeaPPCommerceParameters', $parameters); |
|
526 | + parent::enqueue_js(); |
|
527 | + } |
|
528 | + |
|
529 | + |
|
530 | + /** |
|
531 | + * Form and return PayPal commerce parameters for script localization. |
|
532 | + * |
|
533 | + * @return array |
|
534 | + * @throws EE_Error |
|
535 | + * @throws ReflectionException |
|
536 | + * @throws Exception |
|
537 | + */ |
|
538 | + public function localizeParameters(): array |
|
539 | + { |
|
540 | + // Also tell the script about each instance of this PM. |
|
541 | + $pm_versions = []; |
|
542 | + $active_payment_methods = EEM_Payment_Method::instance()->get_all_active( |
|
543 | + EEM_Payment_Method::scope_cart, |
|
544 | + [['PMD_slug' => ['LIKE', '%paypalcheckout%']]] |
|
545 | + ); |
|
546 | + foreach ($active_payment_methods as $payment_method) { |
|
547 | + $pm_versions[ $payment_method->slug() ] = [ |
|
548 | + 'pm_slug' => $payment_method->slug(), |
|
549 | + ]; |
|
550 | + } |
|
551 | + // Convert money for a display format. |
|
552 | + $decimal_places = CurrencyManager::getDecimalPlaces(); |
|
553 | + $org_country = isset(EE_Registry::instance()->CFG->organization) |
|
554 | + && EE_Registry::instance()->CFG->organization instanceof EE_Organization_Config |
|
555 | + ? EE_Registry::instance()->CFG->organization->CNT_ISO |
|
556 | + : 'US'; |
|
557 | + $transaction_id = $this->transaction instanceof EE_Transaction ? $this->transaction->ID() : 0; |
|
558 | + $currency_code = CurrencyManager::currencyCode(); |
|
559 | + return [ |
|
560 | + 'pm_versions' => $pm_versions, |
|
561 | + 'payment_currency' => $currency_code, |
|
562 | + 'checkout_type' => $this->checkout_type, |
|
563 | + 'currency_sign' => EE_Registry::instance()->CFG->currency->sign, |
|
564 | + 'pp_order_nonce' => wp_create_nonce(Domain::CAPTURE_ORDER_NONCE_NAME), |
|
565 | + // The transaction ID is only used for logging errors. |
|
566 | + 'txn_id' => $transaction_id, |
|
567 | + 'org_country' => $org_country, |
|
568 | + 'decimal_places' => $decimal_places, |
|
569 | + 'site_name' => get_bloginfo('name'), |
|
570 | + 'active_states' => EED_PayPalCommerce::getActiveStates(), |
|
571 | + 'no_spco_error' => esc_html__( |
|
572 | + 'It appears the SDK script was not loaded properly! Please refresh the page and try again or contact support.', |
|
573 | + 'event_espresso' |
|
574 | + ), |
|
575 | + 'no_pm_error' => esc_html__( |
|
576 | + 'It appears that PayPal Commerce checkout JavaScript was not loaded properly! Please refresh the page and try again or contact support. PayPal Commerce payments can\'t be processed.', |
|
577 | + 'event_espresso' |
|
578 | + ), |
|
579 | + 'browser_not_supported' => esc_html__( |
|
580 | + 'It appears that this browser is not supported by PayPal scripts. We apologize, but PayPal payments won\'t work in this browser version.', |
|
581 | + 'event_espresso' |
|
582 | + ), |
|
583 | + 'get_token_error' => esc_html__( |
|
584 | + 'There was an error while trying to get the payment token. Please refresh the page and try again or contact support.', |
|
585 | + 'event_espresso' |
|
586 | + ), |
|
587 | + 'form_validation_notice' => esc_html__('Billing form information not valid.', 'event_espresso'), |
|
588 | + 'no_verification_token' => esc_html__('Missing the Verification token.', 'event_espresso'), |
|
589 | + 'error_response' => esc_html__('Error response received', 'event_espresso'), |
|
590 | + 'payment_error' => esc_html__( |
|
591 | + 'There was an error with this payment. See the logs for details.', |
|
592 | + 'event_espresso' |
|
593 | + ), |
|
594 | + 'no_order_id' => esc_html__('No Order ID found.', 'event_espresso'), |
|
595 | + 'general_pp_error' => esc_html__('PayPal form threw an error.', 'event_espresso'), |
|
596 | + 'hf_render_error' => esc_html__('Hosted fields could not be rendered!', 'event_espresso'), |
|
597 | + 'pm_capture_error' => esc_html__('Payment could not be captured!', 'event_espresso'), |
|
598 | + 'not_acdc_eligible' => esc_html__( |
|
599 | + 'This merchant is not eligible for Advanced Card Fields checkout type.', |
|
600 | + 'event_espresso' |
|
601 | + ), |
|
602 | + ]; |
|
603 | + } |
|
604 | 604 | } |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | $options, |
76 | 76 | [ |
77 | 77 | 'name' => 'PayPalCommerceBillingForm', |
78 | - 'html_id' => 'pp-' . $pm_slug . '-billing-form', |
|
78 | + 'html_id' => 'pp-'.$pm_slug.'-billing-form', |
|
79 | 79 | 'html_class' => 'pp_commerce_billing_form', |
80 | 80 | 'subsections' => [ |
81 | 81 | 'eea_paypal_commerce_token' => new EE_Hidden_Input( |
@@ -87,21 +87,21 @@ discard block |
||
87 | 87 | ), |
88 | 88 | 'pp_order_nonce' => new EE_Hidden_Input( |
89 | 89 | [ |
90 | - 'html_id' => 'eea-' . $pm_slug . '-order-nonce', |
|
90 | + 'html_id' => 'eea-'.$pm_slug.'-order-nonce', |
|
91 | 91 | 'html_name' => 'pp_order_nonce', |
92 | 92 | 'default' => '', |
93 | 93 | ] |
94 | 94 | ), |
95 | 95 | 'pp_order_id' => new EE_Hidden_Input( |
96 | 96 | [ |
97 | - 'html_id' => 'eea-' . $pm_slug . '-order-id', |
|
97 | + 'html_id' => 'eea-'.$pm_slug.'-order-id', |
|
98 | 98 | 'html_name' => 'pp_order_id', |
99 | 99 | 'default' => '', |
100 | 100 | ] |
101 | 101 | ), |
102 | 102 | 'pp_order_status' => new EE_Hidden_Input( |
103 | 103 | [ |
104 | - 'html_id' => 'eea-' . $pm_slug . '-order-status', |
|
104 | + 'html_id' => 'eea-'.$pm_slug.'-order-status', |
|
105 | 105 | 'html_name' => 'pp_order_status', |
106 | 106 | 'default' => '', |
107 | 107 | ] |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | ] |
138 | 138 | ); |
139 | 139 | // Add PayPal Hosted Fields. |
140 | - if (! empty($this->checkout_type) && $this->checkout_type !== 'express_checkout') { |
|
140 | + if ( ! empty($this->checkout_type) && $this->checkout_type !== 'express_checkout') { |
|
141 | 141 | $this->addAdvancedCardFields(); |
142 | 142 | } |
143 | 143 | // Add payment types separator, if both are enabled. |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | $request = LoaderFactory::getShared(Request::class); |
207 | 207 | $request_params = $request->requestParams(); |
208 | 208 | // Only the PPC billing form. |
209 | - if (! $billing_form instanceof BillingForm) { |
|
209 | + if ( ! $billing_form instanceof BillingForm) { |
|
210 | 210 | return $billing_form; |
211 | 211 | } |
212 | 212 | // Make sure the billing form subsections have correct names. |
@@ -251,8 +251,8 @@ discard block |
||
251 | 251 | "$pm_slug-card-number-lbl", |
252 | 252 | "$pm_slug-card-fields", |
253 | 253 | "", |
254 | - 'for="' . $pm_slug . '-card-number"' |
|
255 | - ) . |
|
254 | + 'for="'.$pm_slug.'-card-number"' |
|
255 | + ). |
|
256 | 256 | EEH_HTML::p( |
257 | 257 | "", |
258 | 258 | "$pm_slug-card-number", |
@@ -265,8 +265,8 @@ discard block |
||
265 | 265 | "$pm_slug-expiration-date-lbl", |
266 | 266 | "$pm_slug-card-fields", |
267 | 267 | "", |
268 | - 'for="' . $pm_slug . '-expiration-date"' |
|
269 | - ) . |
|
268 | + 'for="'.$pm_slug.'-expiration-date"' |
|
269 | + ). |
|
270 | 270 | EEH_HTML::p( |
271 | 271 | "", |
272 | 272 | "$pm_slug-expiration-date", |
@@ -279,8 +279,8 @@ discard block |
||
279 | 279 | "$pm_slug-cvv-lbl", |
280 | 280 | "$pm_slug-card-fields", |
281 | 281 | "", |
282 | - 'for="' . $pm_slug . '-cvv"' |
|
283 | - ) . |
|
282 | + 'for="'.$pm_slug.'-cvv"' |
|
283 | + ). |
|
284 | 284 | EEH_HTML::p( |
285 | 285 | "", |
286 | 286 | "$pm_slug-cvv", |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | 'pp_name_on_card' => new EE_Text_Input( |
291 | 291 | [ |
292 | 292 | 'html_label_text' => esc_html__('Name On Card', 'event_espresso'), |
293 | - 'html_id' => $pm_slug . '-card-holder-name', |
|
293 | + 'html_id' => $pm_slug.'-card-holder-name', |
|
294 | 294 | 'html_name' => 'card-holder-name', |
295 | 295 | 'html_class' => '', |
296 | 296 | 'required' => true, |
@@ -329,16 +329,16 @@ discard block |
||
329 | 329 | EEH_HTML::div( |
330 | 330 | EEH_HTML::div( |
331 | 331 | ' ', |
332 | - 'eep-' . $this->paypal_pmt->slug() . '-payments-separator', |
|
332 | + 'eep-'.$this->paypal_pmt->slug().'-payments-separator', |
|
333 | 333 | 'eep-ppc-separator-line eep-left-floating' |
334 | - ) . |
|
334 | + ). |
|
335 | 335 | EEH_HTML::div( |
336 | 336 | esc_html__(' or ', 'event_espresso'), |
337 | - 'eep-' . $this->paypal_pmt->slug() . '-separator-text', |
|
337 | + 'eep-'.$this->paypal_pmt->slug().'-separator-text', |
|
338 | 338 | 'eep-ppc-separator-text1 eep-mid-floating' |
339 | - ) . EEH_HTML::div( |
|
339 | + ).EEH_HTML::div( |
|
340 | 340 | ' ', |
341 | - 'eep-' . $this->paypal_pmt->slug() . '-payments-separator', |
|
341 | + 'eep-'.$this->paypal_pmt->slug().'-payments-separator', |
|
342 | 342 | 'eep-ppc-separator-line eep-right-floating' |
343 | 343 | ), |
344 | 344 | 'eep-ppc-separator-holder', |
@@ -362,9 +362,9 @@ discard block |
||
362 | 362 | { |
363 | 363 | if ( |
364 | 364 | ! empty($options_array['html_id']) |
365 | - && $options_array['html_id'] === 'spco-payment-method-info-' . $this->paypal_pmt->slug() |
|
365 | + && $options_array['html_id'] === 'spco-payment-method-info-'.$this->paypal_pmt->slug() |
|
366 | 366 | ) { |
367 | - if (! empty($options_array['subsections']) && isset($options_array['subsections']['info'])) { |
|
367 | + if ( ! empty($options_array['subsections']) && isset($options_array['subsections']['info'])) { |
|
368 | 368 | unset($options_array['subsections']['info']); |
369 | 369 | } |
370 | 370 | } |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | [ |
387 | 387 | 'layout_strategy' => new EE_Template_Layout( |
388 | 388 | [ |
389 | - 'layout_template_file' => $this->template_path . 'debugInfo.template.php', |
|
389 | + 'layout_template_file' => $this->template_path.'debugInfo.template.php', |
|
390 | 390 | 'template_args' => [], |
391 | 391 | ] |
392 | 392 | ), |
@@ -407,12 +407,12 @@ discard block |
||
407 | 407 | */ |
408 | 408 | public function addPayPalCheckout(): EE_Form_Section_Proper |
409 | 409 | { |
410 | - $template_args['pm_slug'] = $this->paypal_pmt->slug(); |
|
410 | + $template_args['pm_slug'] = $this->paypal_pmt->slug(); |
|
411 | 411 | return new EE_Form_Section_Proper( |
412 | 412 | [ |
413 | 413 | 'layout_strategy' => new EE_Template_Layout( |
414 | 414 | [ |
415 | - 'layout_template_file' => $this->template_path . 'paymentButtons.template.php', |
|
415 | + 'layout_template_file' => $this->template_path.'paymentButtons.template.php', |
|
416 | 416 | 'template_args' => $template_args, |
417 | 417 | ] |
418 | 418 | ), |
@@ -440,7 +440,7 @@ discard block |
||
440 | 440 | } |
441 | 441 | $client_token = $response['client_token']; |
442 | 442 | $attributes = " data-partner-attribution-id=\"$bn_code\" data-client-token=\"$client_token\""; |
443 | - $tag = str_replace('></script>', $attributes . '></script>', $tag); |
|
443 | + $tag = str_replace('></script>', $attributes.'></script>', $tag); |
|
444 | 444 | } |
445 | 445 | return $tag; |
446 | 446 | } |
@@ -471,10 +471,10 @@ discard block |
||
471 | 471 | } |
472 | 472 | |
473 | 473 | // Setup query args |
474 | - $url_params = [ |
|
474 | + $url_params = [ |
|
475 | 475 | 'client-id' => PayPalExtraMetaManager::getPmOption($this->_pm_instance, $client_id_key), |
476 | 476 | 'currency' => CurrencyManager::currencyCode(), |
477 | - 'components' => implode(',', ['buttons','hosted-fields']), |
|
477 | + 'components' => implode(',', ['buttons', 'hosted-fields']), |
|
478 | 478 | 'intent' => 'capture', |
479 | 479 | 'merchant-id' => $merchant_id, |
480 | 480 | ]; |
@@ -508,7 +508,7 @@ discard block |
||
508 | 508 | |
509 | 509 | wp_enqueue_script( |
510 | 510 | 'eea_paypal_commerce_js', |
511 | - EEP_PAYPAL_COMMERCE_URL . 'assets/js/paypal-commerce-payments.js', |
|
511 | + EEP_PAYPAL_COMMERCE_URL.'assets/js/paypal-commerce-payments.js', |
|
512 | 512 | ['eea_paypal_commerce_js_lib'], |
513 | 513 | EVENT_ESPRESSO_VERSION, |
514 | 514 | true |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | // Styles. |
517 | 517 | wp_enqueue_style( |
518 | 518 | 'eea_paypal_checkout_form_styles', |
519 | - EEP_PAYPAL_COMMERCE_URL . 'assets' . DS . 'css' . DS . 'eea-paypal-checkout.css', |
|
519 | + EEP_PAYPAL_COMMERCE_URL.'assets'.DS.'css'.DS.'eea-paypal-checkout.css', |
|
520 | 520 | [], |
521 | 521 | EVENT_ESPRESSO_VERSION |
522 | 522 | ); |
@@ -544,7 +544,7 @@ discard block |
||
544 | 544 | [['PMD_slug' => ['LIKE', '%paypalcheckout%']]] |
545 | 545 | ); |
546 | 546 | foreach ($active_payment_methods as $payment_method) { |
547 | - $pm_versions[ $payment_method->slug() ] = [ |
|
547 | + $pm_versions[$payment_method->slug()] = [ |
|
548 | 548 | 'pm_slug' => $payment_method->slug(), |
549 | 549 | ]; |
550 | 550 | } |
@@ -13,324 +13,324 @@ |
||
13 | 13 | */ |
14 | 14 | class EEG_PayPalCheckout extends EE_Onsite_Gateway |
15 | 15 | { |
16 | - /** |
|
17 | - * Currencies supported by this gateway. |
|
18 | - * |
|
19 | - * @var array |
|
20 | - */ |
|
21 | - protected $_currencies_supported = [ |
|
22 | - 'AUD', |
|
23 | - 'BRL', |
|
24 | - 'CAD', |
|
25 | - 'CNY', |
|
26 | - 'CZK', |
|
27 | - 'DKK', |
|
28 | - 'EUR', |
|
29 | - 'HKD', |
|
30 | - 'HUF', |
|
31 | - 'ILS', |
|
32 | - 'JPY', |
|
33 | - 'MYR', |
|
34 | - 'MXN', |
|
35 | - 'TWD', |
|
36 | - 'NZD', |
|
37 | - 'NOK', |
|
38 | - 'PHP', |
|
39 | - 'PLN', |
|
40 | - 'GBP', |
|
41 | - 'RUB', |
|
42 | - 'SGD', |
|
43 | - 'SEK', |
|
44 | - 'CHF', |
|
45 | - 'THB', |
|
46 | - 'USD', |
|
47 | - ]; |
|
16 | + /** |
|
17 | + * Currencies supported by this gateway. |
|
18 | + * |
|
19 | + * @var array |
|
20 | + */ |
|
21 | + protected $_currencies_supported = [ |
|
22 | + 'AUD', |
|
23 | + 'BRL', |
|
24 | + 'CAD', |
|
25 | + 'CNY', |
|
26 | + 'CZK', |
|
27 | + 'DKK', |
|
28 | + 'EUR', |
|
29 | + 'HKD', |
|
30 | + 'HUF', |
|
31 | + 'ILS', |
|
32 | + 'JPY', |
|
33 | + 'MYR', |
|
34 | + 'MXN', |
|
35 | + 'TWD', |
|
36 | + 'NZD', |
|
37 | + 'NOK', |
|
38 | + 'PHP', |
|
39 | + 'PLN', |
|
40 | + 'GBP', |
|
41 | + 'RUB', |
|
42 | + 'SGD', |
|
43 | + 'SEK', |
|
44 | + 'CHF', |
|
45 | + 'THB', |
|
46 | + 'USD', |
|
47 | + ]; |
|
48 | 48 | |
49 | 49 | |
50 | - /** |
|
51 | - * Override the parent. |
|
52 | - * |
|
53 | - * @param EE_Payment|null $payment |
|
54 | - * @param array|null $billing_info |
|
55 | - * @return EE_Payment |
|
56 | - * @throws EE_Error|ReflectionException |
|
57 | - */ |
|
58 | - public function do_direct_payment($payment, $billing_info = null) |
|
59 | - { |
|
60 | - $request = LoaderFactory::getLoader()->getShared(RequestInterface::class); |
|
61 | - $post_parameters = $request->postParams(); |
|
62 | - // Check the payment. |
|
63 | - $payment = $this->validatePayment($payment, $request); |
|
64 | - if ($payment->details() === 'error' && $payment->status() === EEM_Payment::status_id_failed) { |
|
65 | - return $payment; |
|
66 | - } |
|
67 | - $transaction = $payment->transaction(); |
|
68 | - $payment_method = $transaction->payment_method(); |
|
69 | - // Get the order details. |
|
70 | - $order_id = $request->getRequestParam('pp_order_id'); |
|
71 | - if (! $order_id) { |
|
72 | - return EEG_PayPalCheckout::updatePaymentStatus( |
|
73 | - $payment, |
|
74 | - EEM_Payment::status_id_failed, |
|
75 | - $post_parameters, |
|
76 | - esc_html__('Can\'t charge the Order. The Order ID is missing.', 'event_espresso') |
|
77 | - ); |
|
78 | - } |
|
79 | - // Capture the order. |
|
80 | - $capture_status = EED_PayPalCommerce::captureOrder($transaction, $payment_method, $order_id); |
|
81 | - // Check the order status. |
|
82 | - $order_status = $this->isOrderCompleted($order_id, $transaction, $payment_method); |
|
83 | - if (! $order_status['completed']) { |
|
84 | - return EEG_PayPalCheckout::updatePaymentStatus( |
|
85 | - $payment, |
|
86 | - EEM_Payment::status_id_failed, |
|
87 | - $order_status, |
|
88 | - $order_status['message'] ?? '' |
|
89 | - ); |
|
90 | - } |
|
91 | - // Looks like all is good. Mark payment as a success. |
|
92 | - $this->saveBillingDetails($payment, $transaction, $order_status['details'], $billing_info); |
|
93 | - return EEG_PayPalCheckout::updatePaymentStatus($payment, EEM_Payment::status_id_approved, $capture_status); |
|
94 | - } |
|
50 | + /** |
|
51 | + * Override the parent. |
|
52 | + * |
|
53 | + * @param EE_Payment|null $payment |
|
54 | + * @param array|null $billing_info |
|
55 | + * @return EE_Payment |
|
56 | + * @throws EE_Error|ReflectionException |
|
57 | + */ |
|
58 | + public function do_direct_payment($payment, $billing_info = null) |
|
59 | + { |
|
60 | + $request = LoaderFactory::getLoader()->getShared(RequestInterface::class); |
|
61 | + $post_parameters = $request->postParams(); |
|
62 | + // Check the payment. |
|
63 | + $payment = $this->validatePayment($payment, $request); |
|
64 | + if ($payment->details() === 'error' && $payment->status() === EEM_Payment::status_id_failed) { |
|
65 | + return $payment; |
|
66 | + } |
|
67 | + $transaction = $payment->transaction(); |
|
68 | + $payment_method = $transaction->payment_method(); |
|
69 | + // Get the order details. |
|
70 | + $order_id = $request->getRequestParam('pp_order_id'); |
|
71 | + if (! $order_id) { |
|
72 | + return EEG_PayPalCheckout::updatePaymentStatus( |
|
73 | + $payment, |
|
74 | + EEM_Payment::status_id_failed, |
|
75 | + $post_parameters, |
|
76 | + esc_html__('Can\'t charge the Order. The Order ID is missing.', 'event_espresso') |
|
77 | + ); |
|
78 | + } |
|
79 | + // Capture the order. |
|
80 | + $capture_status = EED_PayPalCommerce::captureOrder($transaction, $payment_method, $order_id); |
|
81 | + // Check the order status. |
|
82 | + $order_status = $this->isOrderCompleted($order_id, $transaction, $payment_method); |
|
83 | + if (! $order_status['completed']) { |
|
84 | + return EEG_PayPalCheckout::updatePaymentStatus( |
|
85 | + $payment, |
|
86 | + EEM_Payment::status_id_failed, |
|
87 | + $order_status, |
|
88 | + $order_status['message'] ?? '' |
|
89 | + ); |
|
90 | + } |
|
91 | + // Looks like all is good. Mark payment as a success. |
|
92 | + $this->saveBillingDetails($payment, $transaction, $order_status['details'], $billing_info); |
|
93 | + return EEG_PayPalCheckout::updatePaymentStatus($payment, EEM_Payment::status_id_approved, $capture_status); |
|
94 | + } |
|
95 | 95 | |
96 | 96 | |
97 | - /** |
|
98 | - * Validate the Order. |
|
99 | - * |
|
100 | - * @param string $order_id |
|
101 | - * @param EE_Transaction $transaction |
|
102 | - * @param EE_Payment_Method $payment_method |
|
103 | - * @return array ['completed' => {boolean}, 'message' => {string}] |
|
104 | - * @throws EE_Error |
|
105 | - * @throws ReflectionException |
|
106 | - */ |
|
107 | - public static function isOrderCompleted( |
|
108 | - string $order_id, |
|
109 | - EE_Transaction $transaction, |
|
110 | - EE_Payment_Method $payment_method |
|
111 | - ): array |
|
112 | - { |
|
113 | - $order_details = EED_PayPalCommerce::getOrderDetails($order_id, $transaction, $payment_method); |
|
114 | - $conclusion = [ |
|
115 | - 'completed' => false, |
|
116 | - 'details' => $order_details, |
|
117 | - ]; |
|
118 | - if (! $order_details) { |
|
119 | - $conclusion['message'] = esc_html__( |
|
120 | - 'Could not validate this payment. The Order details were empty.', |
|
121 | - 'event_espresso' |
|
122 | - ); |
|
123 | - } elseif (! empty($order_details['error'])) { |
|
124 | - $conclusion['message'] = $order_details['message'] ?? $order_details['error']; |
|
125 | - } elseif (empty($order_details['status'])) { |
|
126 | - $conclusion['message'] = esc_html__( |
|
127 | - 'There was an error with this payment. The status of the Order could not be determined.', |
|
128 | - 'event_espresso' |
|
129 | - ); |
|
130 | - } elseif ($order_details['status'] !== 'COMPLETED') { |
|
131 | - $conclusion['message'] = esc_html__( |
|
132 | - 'There was an error with this payment. Order was not approved.', |
|
133 | - 'event_espresso' |
|
134 | - ); |
|
135 | - } elseif (empty($order_details['purchase_units'][0]['payments']['captures'][0]['status'])) { |
|
136 | - $conclusion['message'] = esc_html__( |
|
137 | - 'There was an error with this payment. The status of the Payment could not be determined.', |
|
138 | - 'event_espresso' |
|
139 | - ); |
|
140 | - } elseif ($order_details['purchase_units'][0]['payments']['captures'][0]['status'] !== 'COMPLETED') { |
|
141 | - $conclusion['message'] = esc_html__( |
|
142 | - 'This payment was declined or failed validation. Please check the billing information you provided.', |
|
143 | - 'event_espresso' |
|
144 | - ); |
|
145 | - } else { |
|
146 | - // If we didn't fail on the above, the Order should be considered valid. |
|
147 | - $conclusion['completed'] = true; |
|
148 | - $conclusion['message'] = esc_html__('Order Valid.', 'event_espresso'); |
|
149 | - } |
|
150 | - return $conclusion; |
|
151 | - } |
|
97 | + /** |
|
98 | + * Validate the Order. |
|
99 | + * |
|
100 | + * @param string $order_id |
|
101 | + * @param EE_Transaction $transaction |
|
102 | + * @param EE_Payment_Method $payment_method |
|
103 | + * @return array ['completed' => {boolean}, 'message' => {string}] |
|
104 | + * @throws EE_Error |
|
105 | + * @throws ReflectionException |
|
106 | + */ |
|
107 | + public static function isOrderCompleted( |
|
108 | + string $order_id, |
|
109 | + EE_Transaction $transaction, |
|
110 | + EE_Payment_Method $payment_method |
|
111 | + ): array |
|
112 | + { |
|
113 | + $order_details = EED_PayPalCommerce::getOrderDetails($order_id, $transaction, $payment_method); |
|
114 | + $conclusion = [ |
|
115 | + 'completed' => false, |
|
116 | + 'details' => $order_details, |
|
117 | + ]; |
|
118 | + if (! $order_details) { |
|
119 | + $conclusion['message'] = esc_html__( |
|
120 | + 'Could not validate this payment. The Order details were empty.', |
|
121 | + 'event_espresso' |
|
122 | + ); |
|
123 | + } elseif (! empty($order_details['error'])) { |
|
124 | + $conclusion['message'] = $order_details['message'] ?? $order_details['error']; |
|
125 | + } elseif (empty($order_details['status'])) { |
|
126 | + $conclusion['message'] = esc_html__( |
|
127 | + 'There was an error with this payment. The status of the Order could not be determined.', |
|
128 | + 'event_espresso' |
|
129 | + ); |
|
130 | + } elseif ($order_details['status'] !== 'COMPLETED') { |
|
131 | + $conclusion['message'] = esc_html__( |
|
132 | + 'There was an error with this payment. Order was not approved.', |
|
133 | + 'event_espresso' |
|
134 | + ); |
|
135 | + } elseif (empty($order_details['purchase_units'][0]['payments']['captures'][0]['status'])) { |
|
136 | + $conclusion['message'] = esc_html__( |
|
137 | + 'There was an error with this payment. The status of the Payment could not be determined.', |
|
138 | + 'event_espresso' |
|
139 | + ); |
|
140 | + } elseif ($order_details['purchase_units'][0]['payments']['captures'][0]['status'] !== 'COMPLETED') { |
|
141 | + $conclusion['message'] = esc_html__( |
|
142 | + 'This payment was declined or failed validation. Please check the billing information you provided.', |
|
143 | + 'event_espresso' |
|
144 | + ); |
|
145 | + } else { |
|
146 | + // If we didn't fail on the above, the Order should be considered valid. |
|
147 | + $conclusion['completed'] = true; |
|
148 | + $conclusion['message'] = esc_html__('Order Valid.', 'event_espresso'); |
|
149 | + } |
|
150 | + return $conclusion; |
|
151 | + } |
|
152 | 152 | |
153 | 153 | |
154 | - /** |
|
155 | - * Create an EE Payment. |
|
156 | - * |
|
157 | - * @param EE_Transaction $transaction |
|
158 | - * @param EE_Payment_Method $payment_method |
|
159 | - * @return EE_Payment |
|
160 | - * @throws EE_Error |
|
161 | - * @throws ReflectionException |
|
162 | - */ |
|
163 | - public static function createPayment(EE_Transaction $transaction, EE_Payment_Method $payment_method): EE_Payment |
|
164 | - { |
|
165 | - // No payment for this transaction was created at this point. |
|
166 | - $payment = EE_Payment::new_instance([ |
|
167 | - 'PAY_timestamp' => time(), |
|
168 | - 'TXN_ID' => $transaction->ID(), |
|
169 | - 'PMD_ID' => $payment_method->ID(), |
|
170 | - 'PAY_po_number' => null, |
|
171 | - 'PAY_extra_accntng' => null, |
|
172 | - 'PAY_details' => null, |
|
173 | - ]); |
|
174 | - $payment->save(); |
|
175 | - return $payment; |
|
176 | - } |
|
154 | + /** |
|
155 | + * Create an EE Payment. |
|
156 | + * |
|
157 | + * @param EE_Transaction $transaction |
|
158 | + * @param EE_Payment_Method $payment_method |
|
159 | + * @return EE_Payment |
|
160 | + * @throws EE_Error |
|
161 | + * @throws ReflectionException |
|
162 | + */ |
|
163 | + public static function createPayment(EE_Transaction $transaction, EE_Payment_Method $payment_method): EE_Payment |
|
164 | + { |
|
165 | + // No payment for this transaction was created at this point. |
|
166 | + $payment = EE_Payment::new_instance([ |
|
167 | + 'PAY_timestamp' => time(), |
|
168 | + 'TXN_ID' => $transaction->ID(), |
|
169 | + 'PMD_ID' => $payment_method->ID(), |
|
170 | + 'PAY_po_number' => null, |
|
171 | + 'PAY_extra_accntng' => null, |
|
172 | + 'PAY_details' => null, |
|
173 | + ]); |
|
174 | + $payment->save(); |
|
175 | + return $payment; |
|
176 | + } |
|
177 | 177 | |
178 | 178 | |
179 | - /** |
|
180 | - * Set a payment error and log the data. |
|
181 | - * |
|
182 | - * @param EE_Payment $payment |
|
183 | - * @param string $status |
|
184 | - * @param array|string $response_data |
|
185 | - * @param string $update_message |
|
186 | - * @return EE_Payment |
|
187 | - * @throws EE_Error|ReflectionException |
|
188 | - */ |
|
189 | - public static function updatePaymentStatus( |
|
190 | - EE_Payment $payment, |
|
191 | - string $status, |
|
192 | - $response_data, |
|
193 | - string $update_message = '' |
|
194 | - ): EE_Payment { |
|
195 | - $paypal_pm = ! empty($payment->payment_method()) |
|
196 | - ? EEM_Payment_Method::instance()->get_one_by_slug($payment->payment_method()->name()) |
|
197 | - : null; |
|
198 | - // Is this a successful payment ? |
|
199 | - if ($status === EEM_Payment::status_id_approved) { |
|
200 | - $default_message = esc_html__('Successful payment.', 'event_espresso'); |
|
201 | - $amount = $response_data['purchase_units'][0]['payments']['captures'][0]['amount']['value'] ?? 0; |
|
202 | - // Don't set the amount if there is no info on that with this order. |
|
203 | - if (! empty($amount)) { |
|
204 | - $payment->set_amount((float) $amount); |
|
205 | - } |
|
206 | - $payment->set_txn_id_chq_nmbr( |
|
207 | - $response_data['purchase_units'][0]['payments']['captures'][0]['id'] ?? $response_data['id'] |
|
208 | - ); |
|
209 | - } else { |
|
210 | - $default_message = sprintf( |
|
211 | - esc_html__( |
|
212 | - 'Your payment could not be processed successfully due to a technical issue.%1$sPlease try again or contact%2$s for assistance.', |
|
213 | - 'event_espresso' |
|
214 | - ), |
|
215 | - '<br/>', |
|
216 | - EE_Registry::instance()->CFG->organization->get_pretty('email') |
|
217 | - ); |
|
218 | - } |
|
219 | - $log_message = $update_message ?: $default_message; |
|
220 | - PayPalLogger::errorLog($log_message, $response_data, $paypal_pm, false, $payment->transaction()); |
|
221 | - $payment->set_status($status); |
|
222 | - $payment->set_details($log_message); |
|
223 | - $payment->set_gateway_response($log_message); |
|
224 | - $payment->save(); |
|
225 | - return $payment; |
|
226 | - } |
|
179 | + /** |
|
180 | + * Set a payment error and log the data. |
|
181 | + * |
|
182 | + * @param EE_Payment $payment |
|
183 | + * @param string $status |
|
184 | + * @param array|string $response_data |
|
185 | + * @param string $update_message |
|
186 | + * @return EE_Payment |
|
187 | + * @throws EE_Error|ReflectionException |
|
188 | + */ |
|
189 | + public static function updatePaymentStatus( |
|
190 | + EE_Payment $payment, |
|
191 | + string $status, |
|
192 | + $response_data, |
|
193 | + string $update_message = '' |
|
194 | + ): EE_Payment { |
|
195 | + $paypal_pm = ! empty($payment->payment_method()) |
|
196 | + ? EEM_Payment_Method::instance()->get_one_by_slug($payment->payment_method()->name()) |
|
197 | + : null; |
|
198 | + // Is this a successful payment ? |
|
199 | + if ($status === EEM_Payment::status_id_approved) { |
|
200 | + $default_message = esc_html__('Successful payment.', 'event_espresso'); |
|
201 | + $amount = $response_data['purchase_units'][0]['payments']['captures'][0]['amount']['value'] ?? 0; |
|
202 | + // Don't set the amount if there is no info on that with this order. |
|
203 | + if (! empty($amount)) { |
|
204 | + $payment->set_amount((float) $amount); |
|
205 | + } |
|
206 | + $payment->set_txn_id_chq_nmbr( |
|
207 | + $response_data['purchase_units'][0]['payments']['captures'][0]['id'] ?? $response_data['id'] |
|
208 | + ); |
|
209 | + } else { |
|
210 | + $default_message = sprintf( |
|
211 | + esc_html__( |
|
212 | + 'Your payment could not be processed successfully due to a technical issue.%1$sPlease try again or contact%2$s for assistance.', |
|
213 | + 'event_espresso' |
|
214 | + ), |
|
215 | + '<br/>', |
|
216 | + EE_Registry::instance()->CFG->organization->get_pretty('email') |
|
217 | + ); |
|
218 | + } |
|
219 | + $log_message = $update_message ?: $default_message; |
|
220 | + PayPalLogger::errorLog($log_message, $response_data, $paypal_pm, false, $payment->transaction()); |
|
221 | + $payment->set_status($status); |
|
222 | + $payment->set_details($log_message); |
|
223 | + $payment->set_gateway_response($log_message); |
|
224 | + $payment->save(); |
|
225 | + return $payment; |
|
226 | + } |
|
227 | 227 | |
228 | 228 | |
229 | - /** |
|
230 | - * Validate the payment. |
|
231 | - * |
|
232 | - * @param EE_Payment|null $payment |
|
233 | - * @param RequestInterface $request |
|
234 | - * @return EE_Payment |
|
235 | - * @throws EE_Error |
|
236 | - * @throws ReflectionException |
|
237 | - */ |
|
238 | - public function validatePayment(?EE_Payment $payment, RequestInterface $request): EE_Payment |
|
239 | - { |
|
240 | - $failed_status = $this->_pay_model->failed_status(); |
|
241 | - // Check the payment. |
|
242 | - if (! $payment instanceof EE_Payment) { |
|
243 | - $payment = EE_Payment::new_instance(); |
|
244 | - $error_message = esc_html__('Error. No associated payment was found.', 'event_espresso'); |
|
245 | - return EEG_PayPalCheckout::updatePaymentStatus( |
|
246 | - $payment, |
|
247 | - $failed_status, |
|
248 | - $request->postParams(), |
|
249 | - $error_message |
|
250 | - ); |
|
251 | - } |
|
252 | - // Check the transaction. |
|
253 | - $transaction = $payment->transaction(); |
|
254 | - if (! $transaction instanceof EE_Transaction) { |
|
255 | - $error_message = esc_html__( |
|
256 | - 'Could not process this payment because it has no associated transaction.', |
|
257 | - 'event_espresso' |
|
258 | - ); |
|
259 | - return EEG_PayPalCheckout::updatePaymentStatus( |
|
260 | - $payment, |
|
261 | - $failed_status, |
|
262 | - $request->postParams(), |
|
263 | - $error_message |
|
264 | - ); |
|
265 | - } |
|
266 | - return $payment; |
|
267 | - } |
|
229 | + /** |
|
230 | + * Validate the payment. |
|
231 | + * |
|
232 | + * @param EE_Payment|null $payment |
|
233 | + * @param RequestInterface $request |
|
234 | + * @return EE_Payment |
|
235 | + * @throws EE_Error |
|
236 | + * @throws ReflectionException |
|
237 | + */ |
|
238 | + public function validatePayment(?EE_Payment $payment, RequestInterface $request): EE_Payment |
|
239 | + { |
|
240 | + $failed_status = $this->_pay_model->failed_status(); |
|
241 | + // Check the payment. |
|
242 | + if (! $payment instanceof EE_Payment) { |
|
243 | + $payment = EE_Payment::new_instance(); |
|
244 | + $error_message = esc_html__('Error. No associated payment was found.', 'event_espresso'); |
|
245 | + return EEG_PayPalCheckout::updatePaymentStatus( |
|
246 | + $payment, |
|
247 | + $failed_status, |
|
248 | + $request->postParams(), |
|
249 | + $error_message |
|
250 | + ); |
|
251 | + } |
|
252 | + // Check the transaction. |
|
253 | + $transaction = $payment->transaction(); |
|
254 | + if (! $transaction instanceof EE_Transaction) { |
|
255 | + $error_message = esc_html__( |
|
256 | + 'Could not process this payment because it has no associated transaction.', |
|
257 | + 'event_espresso' |
|
258 | + ); |
|
259 | + return EEG_PayPalCheckout::updatePaymentStatus( |
|
260 | + $payment, |
|
261 | + $failed_status, |
|
262 | + $request->postParams(), |
|
263 | + $error_message |
|
264 | + ); |
|
265 | + } |
|
266 | + return $payment; |
|
267 | + } |
|
268 | 268 | |
269 | 269 | |
270 | - /** |
|
271 | - * Save some transaction details, like billing information. |
|
272 | - * |
|
273 | - * @param EE_Payment $payment |
|
274 | - * @param EE_Transaction $transaction |
|
275 | - * @param array $order |
|
276 | - * @param array $billing_info |
|
277 | - * @return void |
|
278 | - * @throws EE_Error |
|
279 | - * @throws ReflectionException |
|
280 | - */ |
|
281 | - public static function saveBillingDetails( |
|
282 | - EE_Payment $payment, |
|
283 | - EE_Transaction $transaction, |
|
284 | - array $order, |
|
285 | - array $billing_info |
|
286 | - ): void { |
|
287 | - $primary_reg = $transaction->primary_registration(); |
|
288 | - $attendee = $primary_reg instanceof EE_Registration ? $primary_reg->attendee() : null; |
|
289 | - $payment_method = $transaction->payment_method(); |
|
290 | - $post_meta_name = $payment_method->type_obj() instanceof EE_PMT_Base |
|
291 | - ? 'billing_info_' . $payment_method->type_obj()->system_name() |
|
292 | - : ''; |
|
293 | - if (empty($order['payment_source']) || ! $attendee instanceof EE_Attendee) { |
|
294 | - // I guess we are done here then. Just save what we have. |
|
295 | - $payment->set_details($order); |
|
296 | - return; |
|
297 | - } |
|
298 | - // Do we have order information from the express checkout (PayPal button) ? |
|
299 | - $billing_info['first_name'] = $billing_info['first_name'] ?? $attendee->fname(); |
|
300 | - $billing_info['last_name'] = $billing_info['last_name'] ?? $attendee->lname(); |
|
301 | - $billing_info['email'] = $billing_info['email'] ?? $attendee->email(); |
|
302 | - if (! empty($billing_info['address'])) { |
|
303 | - $attendee->set_address($billing_info['address']); |
|
304 | - } |
|
305 | - if (! empty($billing_info['address2'])) { |
|
306 | - $attendee->set_address2($billing_info['address2']); |
|
307 | - } |
|
308 | - if (! empty($billing_info['city'])) { |
|
309 | - $attendee->set_city($billing_info['city']); |
|
310 | - } |
|
311 | - if (! empty($billing_info['state_id'])) { |
|
312 | - $attendee->set_state((int) $billing_info['state_id']); |
|
313 | - } |
|
314 | - if (! empty($billing_info['country'])) { |
|
315 | - $attendee->set_country($billing_info['country']); |
|
316 | - } |
|
317 | - if (! empty($billing_info['zip'])) { |
|
318 | - $attendee->set_zip($billing_info['zip']); |
|
319 | - } |
|
320 | - // Or card information from advanced card fields ? |
|
321 | - $billing_info['credit_card'] = ''; |
|
322 | - if (! empty($order['payment_source']['card'])) { |
|
323 | - $payer_card = $order['payment_source']['card']; |
|
324 | - if (! empty($payer_card['name'])) { |
|
325 | - $full_name = explode(' ', $payer_card['name']); |
|
326 | - // Don't need to save each field because others should be populated from the billing form. |
|
327 | - $billing_info['credit_card'] = $payer_card['last_digits'] ?? ''; |
|
328 | - $billing_info['first_name'] = $full_name[0] ?? $attendee->fname(); |
|
329 | - $billing_info['last_name'] = $full_name[1] ?? $attendee->lname(); |
|
330 | - } |
|
331 | - } |
|
332 | - // Update attendee billing info in the transaction details. |
|
333 | - update_post_meta($attendee->ID(), $post_meta_name, $billing_info); |
|
334 | - $attendee->save(); |
|
335 | - } |
|
270 | + /** |
|
271 | + * Save some transaction details, like billing information. |
|
272 | + * |
|
273 | + * @param EE_Payment $payment |
|
274 | + * @param EE_Transaction $transaction |
|
275 | + * @param array $order |
|
276 | + * @param array $billing_info |
|
277 | + * @return void |
|
278 | + * @throws EE_Error |
|
279 | + * @throws ReflectionException |
|
280 | + */ |
|
281 | + public static function saveBillingDetails( |
|
282 | + EE_Payment $payment, |
|
283 | + EE_Transaction $transaction, |
|
284 | + array $order, |
|
285 | + array $billing_info |
|
286 | + ): void { |
|
287 | + $primary_reg = $transaction->primary_registration(); |
|
288 | + $attendee = $primary_reg instanceof EE_Registration ? $primary_reg->attendee() : null; |
|
289 | + $payment_method = $transaction->payment_method(); |
|
290 | + $post_meta_name = $payment_method->type_obj() instanceof EE_PMT_Base |
|
291 | + ? 'billing_info_' . $payment_method->type_obj()->system_name() |
|
292 | + : ''; |
|
293 | + if (empty($order['payment_source']) || ! $attendee instanceof EE_Attendee) { |
|
294 | + // I guess we are done here then. Just save what we have. |
|
295 | + $payment->set_details($order); |
|
296 | + return; |
|
297 | + } |
|
298 | + // Do we have order information from the express checkout (PayPal button) ? |
|
299 | + $billing_info['first_name'] = $billing_info['first_name'] ?? $attendee->fname(); |
|
300 | + $billing_info['last_name'] = $billing_info['last_name'] ?? $attendee->lname(); |
|
301 | + $billing_info['email'] = $billing_info['email'] ?? $attendee->email(); |
|
302 | + if (! empty($billing_info['address'])) { |
|
303 | + $attendee->set_address($billing_info['address']); |
|
304 | + } |
|
305 | + if (! empty($billing_info['address2'])) { |
|
306 | + $attendee->set_address2($billing_info['address2']); |
|
307 | + } |
|
308 | + if (! empty($billing_info['city'])) { |
|
309 | + $attendee->set_city($billing_info['city']); |
|
310 | + } |
|
311 | + if (! empty($billing_info['state_id'])) { |
|
312 | + $attendee->set_state((int) $billing_info['state_id']); |
|
313 | + } |
|
314 | + if (! empty($billing_info['country'])) { |
|
315 | + $attendee->set_country($billing_info['country']); |
|
316 | + } |
|
317 | + if (! empty($billing_info['zip'])) { |
|
318 | + $attendee->set_zip($billing_info['zip']); |
|
319 | + } |
|
320 | + // Or card information from advanced card fields ? |
|
321 | + $billing_info['credit_card'] = ''; |
|
322 | + if (! empty($order['payment_source']['card'])) { |
|
323 | + $payer_card = $order['payment_source']['card']; |
|
324 | + if (! empty($payer_card['name'])) { |
|
325 | + $full_name = explode(' ', $payer_card['name']); |
|
326 | + // Don't need to save each field because others should be populated from the billing form. |
|
327 | + $billing_info['credit_card'] = $payer_card['last_digits'] ?? ''; |
|
328 | + $billing_info['first_name'] = $full_name[0] ?? $attendee->fname(); |
|
329 | + $billing_info['last_name'] = $full_name[1] ?? $attendee->lname(); |
|
330 | + } |
|
331 | + } |
|
332 | + // Update attendee billing info in the transaction details. |
|
333 | + update_post_meta($attendee->ID(), $post_meta_name, $billing_info); |
|
334 | + $attendee->save(); |
|
335 | + } |
|
336 | 336 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $payment_method = $transaction->payment_method(); |
69 | 69 | // Get the order details. |
70 | 70 | $order_id = $request->getRequestParam('pp_order_id'); |
71 | - if (! $order_id) { |
|
71 | + if ( ! $order_id) { |
|
72 | 72 | return EEG_PayPalCheckout::updatePaymentStatus( |
73 | 73 | $payment, |
74 | 74 | EEM_Payment::status_id_failed, |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $capture_status = EED_PayPalCommerce::captureOrder($transaction, $payment_method, $order_id); |
81 | 81 | // Check the order status. |
82 | 82 | $order_status = $this->isOrderCompleted($order_id, $transaction, $payment_method); |
83 | - if (! $order_status['completed']) { |
|
83 | + if ( ! $order_status['completed']) { |
|
84 | 84 | return EEG_PayPalCheckout::updatePaymentStatus( |
85 | 85 | $payment, |
86 | 86 | EEM_Payment::status_id_failed, |
@@ -115,12 +115,12 @@ discard block |
||
115 | 115 | 'completed' => false, |
116 | 116 | 'details' => $order_details, |
117 | 117 | ]; |
118 | - if (! $order_details) { |
|
118 | + if ( ! $order_details) { |
|
119 | 119 | $conclusion['message'] = esc_html__( |
120 | 120 | 'Could not validate this payment. The Order details were empty.', |
121 | 121 | 'event_espresso' |
122 | 122 | ); |
123 | - } elseif (! empty($order_details['error'])) { |
|
123 | + } elseif ( ! empty($order_details['error'])) { |
|
124 | 124 | $conclusion['message'] = $order_details['message'] ?? $order_details['error']; |
125 | 125 | } elseif (empty($order_details['status'])) { |
126 | 126 | $conclusion['message'] = esc_html__( |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | $default_message = esc_html__('Successful payment.', 'event_espresso'); |
201 | 201 | $amount = $response_data['purchase_units'][0]['payments']['captures'][0]['amount']['value'] ?? 0; |
202 | 202 | // Don't set the amount if there is no info on that with this order. |
203 | - if (! empty($amount)) { |
|
203 | + if ( ! empty($amount)) { |
|
204 | 204 | $payment->set_amount((float) $amount); |
205 | 205 | } |
206 | 206 | $payment->set_txn_id_chq_nmbr( |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | { |
240 | 240 | $failed_status = $this->_pay_model->failed_status(); |
241 | 241 | // Check the payment. |
242 | - if (! $payment instanceof EE_Payment) { |
|
242 | + if ( ! $payment instanceof EE_Payment) { |
|
243 | 243 | $payment = EE_Payment::new_instance(); |
244 | 244 | $error_message = esc_html__('Error. No associated payment was found.', 'event_espresso'); |
245 | 245 | return EEG_PayPalCheckout::updatePaymentStatus( |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | } |
252 | 252 | // Check the transaction. |
253 | 253 | $transaction = $payment->transaction(); |
254 | - if (! $transaction instanceof EE_Transaction) { |
|
254 | + if ( ! $transaction instanceof EE_Transaction) { |
|
255 | 255 | $error_message = esc_html__( |
256 | 256 | 'Could not process this payment because it has no associated transaction.', |
257 | 257 | 'event_espresso' |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | $attendee = $primary_reg instanceof EE_Registration ? $primary_reg->attendee() : null; |
289 | 289 | $payment_method = $transaction->payment_method(); |
290 | 290 | $post_meta_name = $payment_method->type_obj() instanceof EE_PMT_Base |
291 | - ? 'billing_info_' . $payment_method->type_obj()->system_name() |
|
291 | + ? 'billing_info_'.$payment_method->type_obj()->system_name() |
|
292 | 292 | : ''; |
293 | 293 | if (empty($order['payment_source']) || ! $attendee instanceof EE_Attendee) { |
294 | 294 | // I guess we are done here then. Just save what we have. |
@@ -299,29 +299,29 @@ discard block |
||
299 | 299 | $billing_info['first_name'] = $billing_info['first_name'] ?? $attendee->fname(); |
300 | 300 | $billing_info['last_name'] = $billing_info['last_name'] ?? $attendee->lname(); |
301 | 301 | $billing_info['email'] = $billing_info['email'] ?? $attendee->email(); |
302 | - if (! empty($billing_info['address'])) { |
|
302 | + if ( ! empty($billing_info['address'])) { |
|
303 | 303 | $attendee->set_address($billing_info['address']); |
304 | 304 | } |
305 | - if (! empty($billing_info['address2'])) { |
|
305 | + if ( ! empty($billing_info['address2'])) { |
|
306 | 306 | $attendee->set_address2($billing_info['address2']); |
307 | 307 | } |
308 | - if (! empty($billing_info['city'])) { |
|
308 | + if ( ! empty($billing_info['city'])) { |
|
309 | 309 | $attendee->set_city($billing_info['city']); |
310 | 310 | } |
311 | - if (! empty($billing_info['state_id'])) { |
|
311 | + if ( ! empty($billing_info['state_id'])) { |
|
312 | 312 | $attendee->set_state((int) $billing_info['state_id']); |
313 | 313 | } |
314 | - if (! empty($billing_info['country'])) { |
|
314 | + if ( ! empty($billing_info['country'])) { |
|
315 | 315 | $attendee->set_country($billing_info['country']); |
316 | 316 | } |
317 | - if (! empty($billing_info['zip'])) { |
|
317 | + if ( ! empty($billing_info['zip'])) { |
|
318 | 318 | $attendee->set_zip($billing_info['zip']); |
319 | 319 | } |
320 | 320 | // Or card information from advanced card fields ? |
321 | 321 | $billing_info['credit_card'] = ''; |
322 | - if (! empty($order['payment_source']['card'])) { |
|
322 | + if ( ! empty($order['payment_source']['card'])) { |
|
323 | 323 | $payer_card = $order['payment_source']['card']; |
324 | - if (! empty($payer_card['name'])) { |
|
324 | + if ( ! empty($payer_card['name'])) { |
|
325 | 325 | $full_name = explode(' ', $payer_card['name']); |
326 | 326 | // Don't need to save each field because others should be populated from the billing form. |
327 | 327 | $billing_info['credit_card'] = $payer_card['last_digits'] ?? ''; |
@@ -22,384 +22,384 @@ |
||
22 | 22 | */ |
23 | 23 | class PayPalExtraMetaManager |
24 | 24 | { |
25 | - private static ?OpenSSLEncryption $encryptor = null; |
|
26 | - |
|
27 | - private static ?PayPalExtraMeta $pay_pal_extra_meta = null; |
|
28 | - |
|
29 | - |
|
30 | - /** |
|
31 | - * Get PayPal extra meta helper. |
|
32 | - * |
|
33 | - * @param EE_Payment_Method $paypal_pm |
|
34 | - * @return PayPalExtraMeta |
|
35 | - * @throws EE_Error |
|
36 | - * @throws ReflectionException |
|
37 | - */ |
|
38 | - public static function extraMeta(EE_Payment_Method $paypal_pm): PayPalExtraMeta |
|
39 | - { |
|
40 | - if (! PayPalExtraMetaManager::$pay_pal_extra_meta instanceof PayPalExtraMeta) { |
|
41 | - PayPalExtraMetaManager::$pay_pal_extra_meta = new PayPalExtraMeta($paypal_pm); |
|
42 | - } |
|
43 | - return PayPalExtraMetaManager::$pay_pal_extra_meta; |
|
44 | - } |
|
45 | - |
|
46 | - |
|
47 | - /** |
|
48 | - * Get OpenSSLEncryption instance. |
|
49 | - * |
|
50 | - * @return OpenSSLEncryption |
|
51 | - */ |
|
52 | - public static function encryptor(): OpenSSLEncryption |
|
53 | - { |
|
54 | - if (! PayPalExtraMetaManager::$encryptor instanceof OpenSSLEncryption) { |
|
55 | - PayPalExtraMetaManager::$encryptor = LoaderFactory::getLoader()->getShared( |
|
56 | - OpenSSLEncryption::class, |
|
57 | - [new Base64Encoder()] |
|
58 | - ); |
|
59 | - } |
|
60 | - return PayPalExtraMetaManager::$encryptor; |
|
61 | - } |
|
62 | - |
|
63 | - |
|
64 | - /** |
|
65 | - * Get payment method option/extra meta |
|
66 | - * |
|
67 | - * @param EE_Payment_Method $paypal_pm |
|
68 | - * @param string $option_name |
|
69 | - * @return mixed |
|
70 | - * @throws EE_Error |
|
71 | - * @throws ReflectionException |
|
72 | - */ |
|
73 | - public static function getPmOption(EE_Payment_Method $paypal_pm, string $option_name) |
|
74 | - { |
|
75 | - $option_value = PayPalExtraMetaManager::extraMeta($paypal_pm)->getOption($option_name); |
|
76 | - // Decrypt the encrypted options. |
|
77 | - if ( |
|
78 | - $option_name === Domain::META_KEY_ACCESS_TOKEN |
|
79 | - || $option_name === Domain::META_KEY_PARTNER_MERCHANT_ID |
|
80 | - || $option_name === Domain::META_KEY_CLIENT_SECRET |
|
81 | - ) { |
|
82 | - $option_value = PayPalExtraMetaManager::decryptString($option_value, $paypal_pm); |
|
83 | - } |
|
84 | - return $option_value; |
|
85 | - } |
|
86 | - |
|
87 | - |
|
88 | - /** |
|
89 | - * Save payment method option/extra meta |
|
90 | - * |
|
91 | - * @param EE_Payment_Method $paypal_pm |
|
92 | - * @param string $option_name |
|
93 | - * @param $option_value |
|
94 | - * @return bool |
|
95 | - * @throws EE_Error |
|
96 | - * @throws ReflectionException |
|
97 | - */ |
|
98 | - public static function savePmOption(EE_Payment_Method $paypal_pm, string $option_name, $option_value): bool |
|
99 | - { |
|
100 | - return PayPalExtraMetaManager::extraMeta($paypal_pm)->saveOption($option_name, $option_value); |
|
101 | - } |
|
102 | - |
|
103 | - |
|
104 | - /** |
|
105 | - * Save a list of payment method options/extra meta. |
|
106 | - * |
|
107 | - * @param EE_Payment_Method $paypal_pm |
|
108 | - * @param array $options_list |
|
109 | - * @return bool |
|
110 | - * @throws EE_Error |
|
111 | - * @throws ReflectionException |
|
112 | - */ |
|
113 | - public static function savePmOptions(EE_Payment_Method $paypal_pm, array $options_list): bool |
|
114 | - { |
|
115 | - return PayPalExtraMetaManager::extraMeta($paypal_pm)->saveBatch($options_list); |
|
116 | - } |
|
117 | - |
|
118 | - |
|
119 | - /** |
|
120 | - * Delete payment method option/extra meta |
|
121 | - * |
|
122 | - * @param EE_Payment_Method $paypal_pm |
|
123 | - * @param string $option_name |
|
124 | - * @return bool |
|
125 | - * @throws EE_Error |
|
126 | - * @throws ReflectionException |
|
127 | - */ |
|
128 | - public static function deletePmOption(EE_Payment_Method $paypal_pm, string $option_name): bool |
|
129 | - { |
|
130 | - return PayPalExtraMetaManager::extraMeta($paypal_pm)->deleteOption($option_name); |
|
131 | - } |
|
132 | - |
|
133 | - |
|
134 | - /** |
|
135 | - * Get all options for payment method. |
|
136 | - * |
|
137 | - * @param EE_Payment_Method $paypal_pm |
|
138 | - * @return array |
|
139 | - * @throws EE_Error |
|
140 | - * @throws ReflectionException |
|
141 | - */ |
|
142 | - public static function getAllData(EE_Payment_Method $paypal_pm): array |
|
143 | - { |
|
144 | - return PayPalExtraMetaManager::extraMeta($paypal_pm)->getMetaData(); |
|
145 | - } |
|
146 | - |
|
147 | - |
|
148 | - /** |
|
149 | - * Delete payment method metadata. |
|
150 | - * |
|
151 | - * @param EE_Payment_Method $paypal_pm |
|
152 | - * @return bool |
|
153 | - * @throws EE_Error |
|
154 | - * @throws ReflectionException |
|
155 | - */ |
|
156 | - public static function deleteData(EE_Payment_Method $paypal_pm): bool |
|
157 | - { |
|
158 | - return PayPalExtraMetaManager::extraMeta($paypal_pm)->deleteMetaData(); |
|
159 | - } |
|
160 | - |
|
161 | - |
|
162 | - /** |
|
163 | - * Delete all payment method metadata. |
|
164 | - * |
|
165 | - * @param EE_Payment_Method $paypal_pm |
|
166 | - * @return bool |
|
167 | - * @throws EE_Error |
|
168 | - * @throws ReflectionException |
|
169 | - */ |
|
170 | - public static function deleteAllData(EE_Payment_Method $paypal_pm): bool |
|
171 | - { |
|
172 | - return PayPalExtraMetaManager::extraMeta($paypal_pm)->deleteAllMetaData(); |
|
173 | - } |
|
174 | - |
|
175 | - /** |
|
176 | - * Save the debug mode option if it changed. |
|
177 | - * |
|
178 | - * @param EE_Payment_Method $paypal_pm |
|
179 | - * @param array $request_data |
|
180 | - * @return bool Updated or not. |
|
181 | - * @throws EE_Error |
|
182 | - * @throws ReflectionException |
|
183 | - */ |
|
184 | - public static function updateDebugMode(EE_Payment_Method $paypal_pm, array $request_data): bool |
|
185 | - { |
|
186 | - if ( |
|
187 | - isset($request_data['sandbox_mode']) |
|
188 | - && in_array($request_data['sandbox_mode'], ['0', '1'], true) |
|
189 | - && $paypal_pm->debug_mode() !== (bool) $request_data['sandbox_mode'] |
|
190 | - ) { |
|
191 | - try { |
|
192 | - $paypal_pm->save(['PMD_debug_mode' => (bool) $request_data['sandbox_mode']]); |
|
193 | - } catch (EE_Error $e) { |
|
194 | - PayPalLogger::errorLog( |
|
195 | - sprintf( |
|
196 | - esc_html__('Note, debug mode not saved ! %1$s', 'event_espresso'), |
|
197 | - $e->getMessage() |
|
198 | - ), |
|
199 | - ['request_data' => $request_data, 'trace' => $e->getTrace()], |
|
200 | - $paypal_pm |
|
201 | - ); |
|
202 | - return false; |
|
203 | - } |
|
204 | - return true; |
|
205 | - } |
|
206 | - return false; |
|
207 | - } |
|
208 | - |
|
209 | - |
|
210 | - /** |
|
211 | - * Save partner access token and parameters. |
|
212 | - * |
|
213 | - * @param EE_Payment_Method $paypal_pm |
|
214 | - * @param array $response |
|
215 | - * @return bool |
|
216 | - * @throws EE_Error |
|
217 | - * @throws ReflectionException |
|
218 | - */ |
|
219 | - public static function savePartnerAccessToken(EE_Payment_Method $paypal_pm, array $response): bool |
|
220 | - { |
|
221 | - $paypal_data = []; |
|
222 | - $expected_parameters = [ |
|
223 | - Domain::META_KEY_ACCESS_TOKEN, |
|
224 | - Domain::META_KEY_TOKEN_EXPIRES_IN, |
|
225 | - Domain::META_KEY_APP_ID, |
|
226 | - Domain::META_KEY_PARTNER_CLIENT_ID, |
|
227 | - Domain::META_KEY_PARTNER_MERCHANT_ID, |
|
228 | - Domain::META_KEY_BN_CODE, |
|
229 | - ]; |
|
230 | - foreach ($expected_parameters as $api_key) { |
|
231 | - if (! isset($response[ $api_key ])) { |
|
232 | - // Don't want to try saving data that doesn't exist. |
|
233 | - continue; |
|
234 | - } |
|
235 | - try { |
|
236 | - switch ($api_key) { |
|
237 | - case Domain::META_KEY_ACCESS_TOKEN: |
|
238 | - case Domain::META_KEY_PARTNER_MERCHANT_ID: |
|
239 | - $paypal_data[ $api_key ] = PayPalExtraMetaManager::encryptString( |
|
240 | - $response[ $api_key ], |
|
241 | - $paypal_pm |
|
242 | - ); |
|
243 | - break; |
|
244 | - case Domain::META_KEY_TOKEN_EXPIRES_IN: |
|
245 | - $paypal_data[ $api_key ] = time() + (int) sanitize_key($response[ $api_key ]); |
|
246 | - break; |
|
247 | - default: |
|
248 | - $paypal_data[ $api_key ] = sanitize_text_field($response[ $api_key ]); |
|
249 | - } |
|
250 | - } catch (Exception $e) { |
|
251 | - PayPalLogger::errorLog( |
|
252 | - $e->getMessage(), |
|
253 | - ['response' => $response, 'trace' => $e->getTrace()], |
|
254 | - $paypal_pm |
|
255 | - ); |
|
256 | - return false; |
|
257 | - } |
|
258 | - } |
|
259 | - return PayPalExtraMetaManager::savePmOptions($paypal_pm, $paypal_data); |
|
260 | - } |
|
261 | - |
|
262 | - |
|
263 | - /** |
|
264 | - * Save merchant/seller API credentials. |
|
265 | - * |
|
266 | - * @param EE_Payment_Method $paypal_pm |
|
267 | - * @param array $response |
|
268 | - * @return bool |
|
269 | - * @throws EE_Error |
|
270 | - * @throws ReflectionException |
|
271 | - */ |
|
272 | - public static function saveSellerApiCredentials(EE_Payment_Method $paypal_pm, array $response): bool |
|
273 | - { |
|
274 | - $api_credentials = []; |
|
275 | - $expected_parameters = [Domain::META_KEY_SELLER_MERCHANT_ID]; |
|
276 | - foreach ($expected_parameters as $api_key) { |
|
277 | - if (! isset($response[ $api_key ])) { |
|
278 | - // Don't want to try saving data that doesn't exist. |
|
279 | - continue; |
|
280 | - } |
|
281 | - $api_credentials[ $api_key ] = $response[ $api_key ]; |
|
282 | - } |
|
283 | - return PayPalExtraMetaManager::savePmOptions($paypal_pm, $api_credentials); |
|
284 | - } |
|
285 | - |
|
286 | - |
|
287 | - /** |
|
288 | - * Save other payment method related settings from a data array. |
|
289 | - * |
|
290 | - * @param EE_Payment_Method $paypal_pm |
|
291 | - * @param array $data |
|
292 | - * @param array $get_params |
|
293 | - * @return bool |
|
294 | - * @throws EE_Error |
|
295 | - * @throws ReflectionException |
|
296 | - */ |
|
297 | - public static function parseAndSaveOptions(EE_Payment_Method $paypal_pm, array $data, array $get_params): bool |
|
298 | - { |
|
299 | - $allowed_checkout_type = 'express_checkout'; |
|
300 | - // Did the merchant onboard with PPCP enabled or no. |
|
301 | - if (! empty($get_params['selected_payment']) && $get_params['selected_payment'] === 'PPCP') { |
|
302 | - // Make sure that merchant's account really supports advanced card fields (included in the PPCP scope). |
|
303 | - // Has to include "PPCP_CUSTOM" product for ACDC support. "EXPRESS_CHECKOUT" otherwise. |
|
304 | - if (! empty($data['response']['products'][0]['name'])) { |
|
305 | - foreach ($data['response']['products'] as $product) { |
|
306 | - if ($product['name'] === 'PPCP_CUSTOM') { |
|
307 | - // This merchant has PPCP in the products list, so we can enable both (all supported) checkout types. |
|
308 | - $allowed_checkout_type = 'all'; |
|
309 | - break; |
|
310 | - } |
|
311 | - } |
|
312 | - } |
|
313 | - } |
|
314 | - // Set the PM option Checkout type, just in case merchant doesn't save PM options manually. |
|
315 | - $checkout_type_setting = $paypal_pm->get_extra_meta(Domain::META_KEY_CHECKOUT_TYPE, true, false); |
|
316 | - if (! $checkout_type_setting || $checkout_type_setting !== $allowed_checkout_type) { |
|
317 | - $paypal_pm->update_extra_meta(Domain::META_KEY_CHECKOUT_TYPE, $allowed_checkout_type); |
|
318 | - } |
|
319 | - // Save the scopes that were authorized. |
|
320 | - if (! empty($data['response']['oauth_integrations'][0]['oauth_third_party'][0]['scopes'])) { |
|
321 | - $scopes = []; |
|
322 | - foreach ($data['response']['oauth_integrations'][0]['oauth_third_party'][0]['scopes'] as $scope) { |
|
323 | - // Scope will look like: 'https://uri.paypal.com/services/payments/partnerfee' |
|
324 | - $split = explode('/', $scope); |
|
325 | - $split_count = count($split); |
|
326 | - // Get the scope itself. |
|
327 | - $scopes[] = $split[ $split_count - 1 ]; |
|
328 | - } |
|
329 | - if (empty($scopes)) { |
|
330 | - // In case the there's a change in how scopes come in just save the list. |
|
331 | - $scopes = $data['response']['oauth_integrations'][0]['oauth_third_party'][0]['scopes']; |
|
332 | - } |
|
333 | - PayPalExtraMetaManager::savePmOption($paypal_pm, Domain::META_KEY_AUTHORIZED_SCOPES, $scopes); |
|
334 | - } |
|
335 | - return PayPalExtraMetaManager::savePmOption( |
|
336 | - $paypal_pm, |
|
337 | - Domain::META_KEY_ALLOWED_CHECKOUT_TYPE, |
|
338 | - $allowed_checkout_type |
|
339 | - ); |
|
340 | - } |
|
341 | - |
|
342 | - |
|
343 | - /** |
|
344 | - * Encrypt a text field. |
|
345 | - * |
|
346 | - * @param string $text |
|
347 | - * @param EE_Payment_Method $paypal_pm |
|
348 | - * @return string|null |
|
349 | - * @throws Exception |
|
350 | - */ |
|
351 | - public static function encryptString(string $text, EE_Payment_Method $paypal_pm): ?string |
|
352 | - { |
|
353 | - // We sure we are getting something ? |
|
354 | - if (! $text) { |
|
355 | - return $text; |
|
356 | - } |
|
357 | - |
|
358 | - try { |
|
359 | - // Do encrypt. |
|
360 | - $sanitized_text = sanitize_text_field($text); |
|
361 | - $key_identifier = $paypal_pm->debug_mode() |
|
362 | - ? PPCommerceEncryptionKeyManager::SANDBOX_ENCRYPTION_KEY_ID |
|
363 | - : PPCommerceEncryptionKeyManager::PRODUCTION_ENCRYPTION_KEY_ID; |
|
364 | - $encrypted = PayPalExtraMetaManager::encryptor()->encrypt($sanitized_text, $key_identifier); |
|
365 | - } catch (Exception $e) { |
|
366 | - PayPalLogger::errorLog( |
|
367 | - $e->getMessage(), |
|
368 | - ['trace' => $e->getTrace()], |
|
369 | - $paypal_pm |
|
370 | - ); |
|
371 | - } |
|
372 | - return $encrypted ?? null; |
|
373 | - } |
|
374 | - |
|
375 | - |
|
376 | - /** |
|
377 | - * Decrypt a string. |
|
378 | - * |
|
379 | - * @param string $text |
|
380 | - * @param EE_Payment_Method $paypal_pm |
|
381 | - * @return string |
|
382 | - */ |
|
383 | - public static function decryptString(string $text, EE_Payment_Method $paypal_pm): string |
|
384 | - { |
|
385 | - // Are we even getting something ? |
|
386 | - if (! $text) { |
|
387 | - return $text; |
|
388 | - } |
|
389 | - // Try decrypting. |
|
390 | - try { |
|
391 | - $key_identifier = $paypal_pm->debug_mode() |
|
392 | - ? PPCommerceEncryptionKeyManager::SANDBOX_ENCRYPTION_KEY_ID |
|
393 | - : PPCommerceEncryptionKeyManager::PRODUCTION_ENCRYPTION_KEY_ID; |
|
394 | - $decrypted = PayPalExtraMetaManager::encryptor()->decrypt($text, $key_identifier); |
|
395 | - } catch (Exception $e) { |
|
396 | - PayPalLogger::errorLog( |
|
397 | - $e->getMessage(), |
|
398 | - ['trace' => $e->getTrace()], |
|
399 | - $paypal_pm |
|
400 | - ); |
|
401 | - return $text; |
|
402 | - } |
|
403 | - return $decrypted ?? $text; |
|
404 | - } |
|
25 | + private static ?OpenSSLEncryption $encryptor = null; |
|
26 | + |
|
27 | + private static ?PayPalExtraMeta $pay_pal_extra_meta = null; |
|
28 | + |
|
29 | + |
|
30 | + /** |
|
31 | + * Get PayPal extra meta helper. |
|
32 | + * |
|
33 | + * @param EE_Payment_Method $paypal_pm |
|
34 | + * @return PayPalExtraMeta |
|
35 | + * @throws EE_Error |
|
36 | + * @throws ReflectionException |
|
37 | + */ |
|
38 | + public static function extraMeta(EE_Payment_Method $paypal_pm): PayPalExtraMeta |
|
39 | + { |
|
40 | + if (! PayPalExtraMetaManager::$pay_pal_extra_meta instanceof PayPalExtraMeta) { |
|
41 | + PayPalExtraMetaManager::$pay_pal_extra_meta = new PayPalExtraMeta($paypal_pm); |
|
42 | + } |
|
43 | + return PayPalExtraMetaManager::$pay_pal_extra_meta; |
|
44 | + } |
|
45 | + |
|
46 | + |
|
47 | + /** |
|
48 | + * Get OpenSSLEncryption instance. |
|
49 | + * |
|
50 | + * @return OpenSSLEncryption |
|
51 | + */ |
|
52 | + public static function encryptor(): OpenSSLEncryption |
|
53 | + { |
|
54 | + if (! PayPalExtraMetaManager::$encryptor instanceof OpenSSLEncryption) { |
|
55 | + PayPalExtraMetaManager::$encryptor = LoaderFactory::getLoader()->getShared( |
|
56 | + OpenSSLEncryption::class, |
|
57 | + [new Base64Encoder()] |
|
58 | + ); |
|
59 | + } |
|
60 | + return PayPalExtraMetaManager::$encryptor; |
|
61 | + } |
|
62 | + |
|
63 | + |
|
64 | + /** |
|
65 | + * Get payment method option/extra meta |
|
66 | + * |
|
67 | + * @param EE_Payment_Method $paypal_pm |
|
68 | + * @param string $option_name |
|
69 | + * @return mixed |
|
70 | + * @throws EE_Error |
|
71 | + * @throws ReflectionException |
|
72 | + */ |
|
73 | + public static function getPmOption(EE_Payment_Method $paypal_pm, string $option_name) |
|
74 | + { |
|
75 | + $option_value = PayPalExtraMetaManager::extraMeta($paypal_pm)->getOption($option_name); |
|
76 | + // Decrypt the encrypted options. |
|
77 | + if ( |
|
78 | + $option_name === Domain::META_KEY_ACCESS_TOKEN |
|
79 | + || $option_name === Domain::META_KEY_PARTNER_MERCHANT_ID |
|
80 | + || $option_name === Domain::META_KEY_CLIENT_SECRET |
|
81 | + ) { |
|
82 | + $option_value = PayPalExtraMetaManager::decryptString($option_value, $paypal_pm); |
|
83 | + } |
|
84 | + return $option_value; |
|
85 | + } |
|
86 | + |
|
87 | + |
|
88 | + /** |
|
89 | + * Save payment method option/extra meta |
|
90 | + * |
|
91 | + * @param EE_Payment_Method $paypal_pm |
|
92 | + * @param string $option_name |
|
93 | + * @param $option_value |
|
94 | + * @return bool |
|
95 | + * @throws EE_Error |
|
96 | + * @throws ReflectionException |
|
97 | + */ |
|
98 | + public static function savePmOption(EE_Payment_Method $paypal_pm, string $option_name, $option_value): bool |
|
99 | + { |
|
100 | + return PayPalExtraMetaManager::extraMeta($paypal_pm)->saveOption($option_name, $option_value); |
|
101 | + } |
|
102 | + |
|
103 | + |
|
104 | + /** |
|
105 | + * Save a list of payment method options/extra meta. |
|
106 | + * |
|
107 | + * @param EE_Payment_Method $paypal_pm |
|
108 | + * @param array $options_list |
|
109 | + * @return bool |
|
110 | + * @throws EE_Error |
|
111 | + * @throws ReflectionException |
|
112 | + */ |
|
113 | + public static function savePmOptions(EE_Payment_Method $paypal_pm, array $options_list): bool |
|
114 | + { |
|
115 | + return PayPalExtraMetaManager::extraMeta($paypal_pm)->saveBatch($options_list); |
|
116 | + } |
|
117 | + |
|
118 | + |
|
119 | + /** |
|
120 | + * Delete payment method option/extra meta |
|
121 | + * |
|
122 | + * @param EE_Payment_Method $paypal_pm |
|
123 | + * @param string $option_name |
|
124 | + * @return bool |
|
125 | + * @throws EE_Error |
|
126 | + * @throws ReflectionException |
|
127 | + */ |
|
128 | + public static function deletePmOption(EE_Payment_Method $paypal_pm, string $option_name): bool |
|
129 | + { |
|
130 | + return PayPalExtraMetaManager::extraMeta($paypal_pm)->deleteOption($option_name); |
|
131 | + } |
|
132 | + |
|
133 | + |
|
134 | + /** |
|
135 | + * Get all options for payment method. |
|
136 | + * |
|
137 | + * @param EE_Payment_Method $paypal_pm |
|
138 | + * @return array |
|
139 | + * @throws EE_Error |
|
140 | + * @throws ReflectionException |
|
141 | + */ |
|
142 | + public static function getAllData(EE_Payment_Method $paypal_pm): array |
|
143 | + { |
|
144 | + return PayPalExtraMetaManager::extraMeta($paypal_pm)->getMetaData(); |
|
145 | + } |
|
146 | + |
|
147 | + |
|
148 | + /** |
|
149 | + * Delete payment method metadata. |
|
150 | + * |
|
151 | + * @param EE_Payment_Method $paypal_pm |
|
152 | + * @return bool |
|
153 | + * @throws EE_Error |
|
154 | + * @throws ReflectionException |
|
155 | + */ |
|
156 | + public static function deleteData(EE_Payment_Method $paypal_pm): bool |
|
157 | + { |
|
158 | + return PayPalExtraMetaManager::extraMeta($paypal_pm)->deleteMetaData(); |
|
159 | + } |
|
160 | + |
|
161 | + |
|
162 | + /** |
|
163 | + * Delete all payment method metadata. |
|
164 | + * |
|
165 | + * @param EE_Payment_Method $paypal_pm |
|
166 | + * @return bool |
|
167 | + * @throws EE_Error |
|
168 | + * @throws ReflectionException |
|
169 | + */ |
|
170 | + public static function deleteAllData(EE_Payment_Method $paypal_pm): bool |
|
171 | + { |
|
172 | + return PayPalExtraMetaManager::extraMeta($paypal_pm)->deleteAllMetaData(); |
|
173 | + } |
|
174 | + |
|
175 | + /** |
|
176 | + * Save the debug mode option if it changed. |
|
177 | + * |
|
178 | + * @param EE_Payment_Method $paypal_pm |
|
179 | + * @param array $request_data |
|
180 | + * @return bool Updated or not. |
|
181 | + * @throws EE_Error |
|
182 | + * @throws ReflectionException |
|
183 | + */ |
|
184 | + public static function updateDebugMode(EE_Payment_Method $paypal_pm, array $request_data): bool |
|
185 | + { |
|
186 | + if ( |
|
187 | + isset($request_data['sandbox_mode']) |
|
188 | + && in_array($request_data['sandbox_mode'], ['0', '1'], true) |
|
189 | + && $paypal_pm->debug_mode() !== (bool) $request_data['sandbox_mode'] |
|
190 | + ) { |
|
191 | + try { |
|
192 | + $paypal_pm->save(['PMD_debug_mode' => (bool) $request_data['sandbox_mode']]); |
|
193 | + } catch (EE_Error $e) { |
|
194 | + PayPalLogger::errorLog( |
|
195 | + sprintf( |
|
196 | + esc_html__('Note, debug mode not saved ! %1$s', 'event_espresso'), |
|
197 | + $e->getMessage() |
|
198 | + ), |
|
199 | + ['request_data' => $request_data, 'trace' => $e->getTrace()], |
|
200 | + $paypal_pm |
|
201 | + ); |
|
202 | + return false; |
|
203 | + } |
|
204 | + return true; |
|
205 | + } |
|
206 | + return false; |
|
207 | + } |
|
208 | + |
|
209 | + |
|
210 | + /** |
|
211 | + * Save partner access token and parameters. |
|
212 | + * |
|
213 | + * @param EE_Payment_Method $paypal_pm |
|
214 | + * @param array $response |
|
215 | + * @return bool |
|
216 | + * @throws EE_Error |
|
217 | + * @throws ReflectionException |
|
218 | + */ |
|
219 | + public static function savePartnerAccessToken(EE_Payment_Method $paypal_pm, array $response): bool |
|
220 | + { |
|
221 | + $paypal_data = []; |
|
222 | + $expected_parameters = [ |
|
223 | + Domain::META_KEY_ACCESS_TOKEN, |
|
224 | + Domain::META_KEY_TOKEN_EXPIRES_IN, |
|
225 | + Domain::META_KEY_APP_ID, |
|
226 | + Domain::META_KEY_PARTNER_CLIENT_ID, |
|
227 | + Domain::META_KEY_PARTNER_MERCHANT_ID, |
|
228 | + Domain::META_KEY_BN_CODE, |
|
229 | + ]; |
|
230 | + foreach ($expected_parameters as $api_key) { |
|
231 | + if (! isset($response[ $api_key ])) { |
|
232 | + // Don't want to try saving data that doesn't exist. |
|
233 | + continue; |
|
234 | + } |
|
235 | + try { |
|
236 | + switch ($api_key) { |
|
237 | + case Domain::META_KEY_ACCESS_TOKEN: |
|
238 | + case Domain::META_KEY_PARTNER_MERCHANT_ID: |
|
239 | + $paypal_data[ $api_key ] = PayPalExtraMetaManager::encryptString( |
|
240 | + $response[ $api_key ], |
|
241 | + $paypal_pm |
|
242 | + ); |
|
243 | + break; |
|
244 | + case Domain::META_KEY_TOKEN_EXPIRES_IN: |
|
245 | + $paypal_data[ $api_key ] = time() + (int) sanitize_key($response[ $api_key ]); |
|
246 | + break; |
|
247 | + default: |
|
248 | + $paypal_data[ $api_key ] = sanitize_text_field($response[ $api_key ]); |
|
249 | + } |
|
250 | + } catch (Exception $e) { |
|
251 | + PayPalLogger::errorLog( |
|
252 | + $e->getMessage(), |
|
253 | + ['response' => $response, 'trace' => $e->getTrace()], |
|
254 | + $paypal_pm |
|
255 | + ); |
|
256 | + return false; |
|
257 | + } |
|
258 | + } |
|
259 | + return PayPalExtraMetaManager::savePmOptions($paypal_pm, $paypal_data); |
|
260 | + } |
|
261 | + |
|
262 | + |
|
263 | + /** |
|
264 | + * Save merchant/seller API credentials. |
|
265 | + * |
|
266 | + * @param EE_Payment_Method $paypal_pm |
|
267 | + * @param array $response |
|
268 | + * @return bool |
|
269 | + * @throws EE_Error |
|
270 | + * @throws ReflectionException |
|
271 | + */ |
|
272 | + public static function saveSellerApiCredentials(EE_Payment_Method $paypal_pm, array $response): bool |
|
273 | + { |
|
274 | + $api_credentials = []; |
|
275 | + $expected_parameters = [Domain::META_KEY_SELLER_MERCHANT_ID]; |
|
276 | + foreach ($expected_parameters as $api_key) { |
|
277 | + if (! isset($response[ $api_key ])) { |
|
278 | + // Don't want to try saving data that doesn't exist. |
|
279 | + continue; |
|
280 | + } |
|
281 | + $api_credentials[ $api_key ] = $response[ $api_key ]; |
|
282 | + } |
|
283 | + return PayPalExtraMetaManager::savePmOptions($paypal_pm, $api_credentials); |
|
284 | + } |
|
285 | + |
|
286 | + |
|
287 | + /** |
|
288 | + * Save other payment method related settings from a data array. |
|
289 | + * |
|
290 | + * @param EE_Payment_Method $paypal_pm |
|
291 | + * @param array $data |
|
292 | + * @param array $get_params |
|
293 | + * @return bool |
|
294 | + * @throws EE_Error |
|
295 | + * @throws ReflectionException |
|
296 | + */ |
|
297 | + public static function parseAndSaveOptions(EE_Payment_Method $paypal_pm, array $data, array $get_params): bool |
|
298 | + { |
|
299 | + $allowed_checkout_type = 'express_checkout'; |
|
300 | + // Did the merchant onboard with PPCP enabled or no. |
|
301 | + if (! empty($get_params['selected_payment']) && $get_params['selected_payment'] === 'PPCP') { |
|
302 | + // Make sure that merchant's account really supports advanced card fields (included in the PPCP scope). |
|
303 | + // Has to include "PPCP_CUSTOM" product for ACDC support. "EXPRESS_CHECKOUT" otherwise. |
|
304 | + if (! empty($data['response']['products'][0]['name'])) { |
|
305 | + foreach ($data['response']['products'] as $product) { |
|
306 | + if ($product['name'] === 'PPCP_CUSTOM') { |
|
307 | + // This merchant has PPCP in the products list, so we can enable both (all supported) checkout types. |
|
308 | + $allowed_checkout_type = 'all'; |
|
309 | + break; |
|
310 | + } |
|
311 | + } |
|
312 | + } |
|
313 | + } |
|
314 | + // Set the PM option Checkout type, just in case merchant doesn't save PM options manually. |
|
315 | + $checkout_type_setting = $paypal_pm->get_extra_meta(Domain::META_KEY_CHECKOUT_TYPE, true, false); |
|
316 | + if (! $checkout_type_setting || $checkout_type_setting !== $allowed_checkout_type) { |
|
317 | + $paypal_pm->update_extra_meta(Domain::META_KEY_CHECKOUT_TYPE, $allowed_checkout_type); |
|
318 | + } |
|
319 | + // Save the scopes that were authorized. |
|
320 | + if (! empty($data['response']['oauth_integrations'][0]['oauth_third_party'][0]['scopes'])) { |
|
321 | + $scopes = []; |
|
322 | + foreach ($data['response']['oauth_integrations'][0]['oauth_third_party'][0]['scopes'] as $scope) { |
|
323 | + // Scope will look like: 'https://uri.paypal.com/services/payments/partnerfee' |
|
324 | + $split = explode('/', $scope); |
|
325 | + $split_count = count($split); |
|
326 | + // Get the scope itself. |
|
327 | + $scopes[] = $split[ $split_count - 1 ]; |
|
328 | + } |
|
329 | + if (empty($scopes)) { |
|
330 | + // In case the there's a change in how scopes come in just save the list. |
|
331 | + $scopes = $data['response']['oauth_integrations'][0]['oauth_third_party'][0]['scopes']; |
|
332 | + } |
|
333 | + PayPalExtraMetaManager::savePmOption($paypal_pm, Domain::META_KEY_AUTHORIZED_SCOPES, $scopes); |
|
334 | + } |
|
335 | + return PayPalExtraMetaManager::savePmOption( |
|
336 | + $paypal_pm, |
|
337 | + Domain::META_KEY_ALLOWED_CHECKOUT_TYPE, |
|
338 | + $allowed_checkout_type |
|
339 | + ); |
|
340 | + } |
|
341 | + |
|
342 | + |
|
343 | + /** |
|
344 | + * Encrypt a text field. |
|
345 | + * |
|
346 | + * @param string $text |
|
347 | + * @param EE_Payment_Method $paypal_pm |
|
348 | + * @return string|null |
|
349 | + * @throws Exception |
|
350 | + */ |
|
351 | + public static function encryptString(string $text, EE_Payment_Method $paypal_pm): ?string |
|
352 | + { |
|
353 | + // We sure we are getting something ? |
|
354 | + if (! $text) { |
|
355 | + return $text; |
|
356 | + } |
|
357 | + |
|
358 | + try { |
|
359 | + // Do encrypt. |
|
360 | + $sanitized_text = sanitize_text_field($text); |
|
361 | + $key_identifier = $paypal_pm->debug_mode() |
|
362 | + ? PPCommerceEncryptionKeyManager::SANDBOX_ENCRYPTION_KEY_ID |
|
363 | + : PPCommerceEncryptionKeyManager::PRODUCTION_ENCRYPTION_KEY_ID; |
|
364 | + $encrypted = PayPalExtraMetaManager::encryptor()->encrypt($sanitized_text, $key_identifier); |
|
365 | + } catch (Exception $e) { |
|
366 | + PayPalLogger::errorLog( |
|
367 | + $e->getMessage(), |
|
368 | + ['trace' => $e->getTrace()], |
|
369 | + $paypal_pm |
|
370 | + ); |
|
371 | + } |
|
372 | + return $encrypted ?? null; |
|
373 | + } |
|
374 | + |
|
375 | + |
|
376 | + /** |
|
377 | + * Decrypt a string. |
|
378 | + * |
|
379 | + * @param string $text |
|
380 | + * @param EE_Payment_Method $paypal_pm |
|
381 | + * @return string |
|
382 | + */ |
|
383 | + public static function decryptString(string $text, EE_Payment_Method $paypal_pm): string |
|
384 | + { |
|
385 | + // Are we even getting something ? |
|
386 | + if (! $text) { |
|
387 | + return $text; |
|
388 | + } |
|
389 | + // Try decrypting. |
|
390 | + try { |
|
391 | + $key_identifier = $paypal_pm->debug_mode() |
|
392 | + ? PPCommerceEncryptionKeyManager::SANDBOX_ENCRYPTION_KEY_ID |
|
393 | + : PPCommerceEncryptionKeyManager::PRODUCTION_ENCRYPTION_KEY_ID; |
|
394 | + $decrypted = PayPalExtraMetaManager::encryptor()->decrypt($text, $key_identifier); |
|
395 | + } catch (Exception $e) { |
|
396 | + PayPalLogger::errorLog( |
|
397 | + $e->getMessage(), |
|
398 | + ['trace' => $e->getTrace()], |
|
399 | + $paypal_pm |
|
400 | + ); |
|
401 | + return $text; |
|
402 | + } |
|
403 | + return $decrypted ?? $text; |
|
404 | + } |
|
405 | 405 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public static function extraMeta(EE_Payment_Method $paypal_pm): PayPalExtraMeta |
39 | 39 | { |
40 | - if (! PayPalExtraMetaManager::$pay_pal_extra_meta instanceof PayPalExtraMeta) { |
|
40 | + if ( ! PayPalExtraMetaManager::$pay_pal_extra_meta instanceof PayPalExtraMeta) { |
|
41 | 41 | PayPalExtraMetaManager::$pay_pal_extra_meta = new PayPalExtraMeta($paypal_pm); |
42 | 42 | } |
43 | 43 | return PayPalExtraMetaManager::$pay_pal_extra_meta; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public static function encryptor(): OpenSSLEncryption |
53 | 53 | { |
54 | - if (! PayPalExtraMetaManager::$encryptor instanceof OpenSSLEncryption) { |
|
54 | + if ( ! PayPalExtraMetaManager::$encryptor instanceof OpenSSLEncryption) { |
|
55 | 55 | PayPalExtraMetaManager::$encryptor = LoaderFactory::getLoader()->getShared( |
56 | 56 | OpenSSLEncryption::class, |
57 | 57 | [new Base64Encoder()] |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | Domain::META_KEY_BN_CODE, |
229 | 229 | ]; |
230 | 230 | foreach ($expected_parameters as $api_key) { |
231 | - if (! isset($response[ $api_key ])) { |
|
231 | + if ( ! isset($response[$api_key])) { |
|
232 | 232 | // Don't want to try saving data that doesn't exist. |
233 | 233 | continue; |
234 | 234 | } |
@@ -236,16 +236,16 @@ discard block |
||
236 | 236 | switch ($api_key) { |
237 | 237 | case Domain::META_KEY_ACCESS_TOKEN: |
238 | 238 | case Domain::META_KEY_PARTNER_MERCHANT_ID: |
239 | - $paypal_data[ $api_key ] = PayPalExtraMetaManager::encryptString( |
|
240 | - $response[ $api_key ], |
|
239 | + $paypal_data[$api_key] = PayPalExtraMetaManager::encryptString( |
|
240 | + $response[$api_key], |
|
241 | 241 | $paypal_pm |
242 | 242 | ); |
243 | 243 | break; |
244 | 244 | case Domain::META_KEY_TOKEN_EXPIRES_IN: |
245 | - $paypal_data[ $api_key ] = time() + (int) sanitize_key($response[ $api_key ]); |
|
245 | + $paypal_data[$api_key] = time() + (int) sanitize_key($response[$api_key]); |
|
246 | 246 | break; |
247 | 247 | default: |
248 | - $paypal_data[ $api_key ] = sanitize_text_field($response[ $api_key ]); |
|
248 | + $paypal_data[$api_key] = sanitize_text_field($response[$api_key]); |
|
249 | 249 | } |
250 | 250 | } catch (Exception $e) { |
251 | 251 | PayPalLogger::errorLog( |
@@ -274,11 +274,11 @@ discard block |
||
274 | 274 | $api_credentials = []; |
275 | 275 | $expected_parameters = [Domain::META_KEY_SELLER_MERCHANT_ID]; |
276 | 276 | foreach ($expected_parameters as $api_key) { |
277 | - if (! isset($response[ $api_key ])) { |
|
277 | + if ( ! isset($response[$api_key])) { |
|
278 | 278 | // Don't want to try saving data that doesn't exist. |
279 | 279 | continue; |
280 | 280 | } |
281 | - $api_credentials[ $api_key ] = $response[ $api_key ]; |
|
281 | + $api_credentials[$api_key] = $response[$api_key]; |
|
282 | 282 | } |
283 | 283 | return PayPalExtraMetaManager::savePmOptions($paypal_pm, $api_credentials); |
284 | 284 | } |
@@ -298,10 +298,10 @@ discard block |
||
298 | 298 | { |
299 | 299 | $allowed_checkout_type = 'express_checkout'; |
300 | 300 | // Did the merchant onboard with PPCP enabled or no. |
301 | - if (! empty($get_params['selected_payment']) && $get_params['selected_payment'] === 'PPCP') { |
|
301 | + if ( ! empty($get_params['selected_payment']) && $get_params['selected_payment'] === 'PPCP') { |
|
302 | 302 | // Make sure that merchant's account really supports advanced card fields (included in the PPCP scope). |
303 | 303 | // Has to include "PPCP_CUSTOM" product for ACDC support. "EXPRESS_CHECKOUT" otherwise. |
304 | - if (! empty($data['response']['products'][0]['name'])) { |
|
304 | + if ( ! empty($data['response']['products'][0]['name'])) { |
|
305 | 305 | foreach ($data['response']['products'] as $product) { |
306 | 306 | if ($product['name'] === 'PPCP_CUSTOM') { |
307 | 307 | // This merchant has PPCP in the products list, so we can enable both (all supported) checkout types. |
@@ -313,18 +313,18 @@ discard block |
||
313 | 313 | } |
314 | 314 | // Set the PM option Checkout type, just in case merchant doesn't save PM options manually. |
315 | 315 | $checkout_type_setting = $paypal_pm->get_extra_meta(Domain::META_KEY_CHECKOUT_TYPE, true, false); |
316 | - if (! $checkout_type_setting || $checkout_type_setting !== $allowed_checkout_type) { |
|
316 | + if ( ! $checkout_type_setting || $checkout_type_setting !== $allowed_checkout_type) { |
|
317 | 317 | $paypal_pm->update_extra_meta(Domain::META_KEY_CHECKOUT_TYPE, $allowed_checkout_type); |
318 | 318 | } |
319 | 319 | // Save the scopes that were authorized. |
320 | - if (! empty($data['response']['oauth_integrations'][0]['oauth_third_party'][0]['scopes'])) { |
|
320 | + if ( ! empty($data['response']['oauth_integrations'][0]['oauth_third_party'][0]['scopes'])) { |
|
321 | 321 | $scopes = []; |
322 | 322 | foreach ($data['response']['oauth_integrations'][0]['oauth_third_party'][0]['scopes'] as $scope) { |
323 | 323 | // Scope will look like: 'https://uri.paypal.com/services/payments/partnerfee' |
324 | 324 | $split = explode('/', $scope); |
325 | 325 | $split_count = count($split); |
326 | 326 | // Get the scope itself. |
327 | - $scopes[] = $split[ $split_count - 1 ]; |
|
327 | + $scopes[] = $split[$split_count - 1]; |
|
328 | 328 | } |
329 | 329 | if (empty($scopes)) { |
330 | 330 | // In case the there's a change in how scopes come in just save the list. |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | public static function encryptString(string $text, EE_Payment_Method $paypal_pm): ?string |
352 | 352 | { |
353 | 353 | // We sure we are getting something ? |
354 | - if (! $text) { |
|
354 | + if ( ! $text) { |
|
355 | 355 | return $text; |
356 | 356 | } |
357 | 357 | |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | public static function decryptString(string $text, EE_Payment_Method $paypal_pm): string |
384 | 384 | { |
385 | 385 | // Are we even getting something ? |
386 | - if (! $text) { |
|
386 | + if ( ! $text) { |
|
387 | 387 | return $text; |
388 | 388 | } |
389 | 389 | // Try decrypting. |
@@ -2,140 +2,140 @@ discard block |
||
2 | 2 | /* THIS IS A GENERATED FILE. DO NOT EDIT DIRECTLY. */ |
3 | 3 | $generated_i18n_strings = array( |
4 | 4 | // Reference: packages/ui-components/src/Pagination/constants.ts:6 |
5 | - __( '2', 'event_espresso' ), |
|
5 | + __('2', 'event_espresso'), |
|
6 | 6 | |
7 | 7 | // Reference: packages/ui-components/src/Pagination/constants.ts:7 |
8 | - __( '6', 'event_espresso' ), |
|
8 | + __('6', 'event_espresso'), |
|
9 | 9 | |
10 | 10 | // Reference: packages/ui-components/src/Pagination/constants.ts:8 |
11 | - __( '12', 'event_espresso' ), |
|
11 | + __('12', 'event_espresso'), |
|
12 | 12 | |
13 | 13 | // Reference: packages/ui-components/src/Pagination/constants.ts:9 |
14 | - __( '24', 'event_espresso' ), |
|
14 | + __('24', 'event_espresso'), |
|
15 | 15 | |
16 | 16 | // Reference: packages/ui-components/src/Pagination/constants.ts:10 |
17 | - __( '48', 'event_espresso' ), |
|
17 | + __('48', 'event_espresso'), |
|
18 | 18 | |
19 | 19 | // Reference: packages/ui-components/src/Pagination/constants.ts:11 |
20 | - __( '96', 'event_espresso' ), |
|
20 | + __('96', 'event_espresso'), |
|
21 | 21 | |
22 | 22 | // Reference: domains/core/admin/blocks/src/components/AvatarImage.tsx:27 |
23 | - __( 'contact avatar', 'event_espresso' ), |
|
23 | + __('contact avatar', 'event_espresso'), |
|
24 | 24 | |
25 | 25 | // Reference: domains/core/admin/blocks/src/components/OrderByControl.tsx:12 |
26 | - __( 'Order by', 'event_espresso' ), |
|
26 | + __('Order by', 'event_espresso'), |
|
27 | 27 | |
28 | 28 | // Reference: domains/core/admin/blocks/src/components/RegStatusControl.tsx:17 |
29 | 29 | // Reference: domains/core/admin/blocks/src/event-attendees/controls/SelectStatus.tsx:13 |
30 | - __( 'Select Registration Status', 'event_espresso' ), |
|
30 | + __('Select Registration Status', 'event_espresso'), |
|
31 | 31 | |
32 | 32 | // Reference: domains/core/admin/blocks/src/components/SortOrderControl.tsx:14 |
33 | - __( 'Ascending', 'event_espresso' ), |
|
33 | + __('Ascending', 'event_espresso'), |
|
34 | 34 | |
35 | 35 | // Reference: domains/core/admin/blocks/src/components/SortOrderControl.tsx:18 |
36 | - __( 'Descending', 'event_espresso' ), |
|
36 | + __('Descending', 'event_espresso'), |
|
37 | 37 | |
38 | 38 | // Reference: domains/core/admin/blocks/src/components/SortOrderControl.tsx:24 |
39 | - __( 'Sort order:', 'event_espresso' ), |
|
39 | + __('Sort order:', 'event_espresso'), |
|
40 | 40 | |
41 | 41 | // Reference: domains/core/admin/blocks/src/event-attendees/AttendeesDisplay.tsx:41 |
42 | - __( 'There was some error fetching attendees list', 'event_espresso' ), |
|
42 | + __('There was some error fetching attendees list', 'event_espresso'), |
|
43 | 43 | |
44 | 44 | // Reference: domains/core/admin/blocks/src/event-attendees/AttendeesDisplay.tsx:47 |
45 | - __( 'To get started, select what event you want to show attendees from in the block settings.', 'event_espresso' ), |
|
45 | + __('To get started, select what event you want to show attendees from in the block settings.', 'event_espresso'), |
|
46 | 46 | |
47 | 47 | // Reference: domains/core/admin/blocks/src/event-attendees/AttendeesDisplay.tsx:53 |
48 | - __( 'There are no attendees for selected options.', 'event_espresso' ), |
|
48 | + __('There are no attendees for selected options.', 'event_espresso'), |
|
49 | 49 | |
50 | 50 | // Reference: domains/core/admin/blocks/src/event-attendees/controls/ArchiveSettings.tsx:12 |
51 | - __( 'Display on Archives', 'event_espresso' ), |
|
51 | + __('Display on Archives', 'event_espresso'), |
|
52 | 52 | |
53 | 53 | // Reference: domains/core/admin/blocks/src/event-attendees/controls/ArchiveSettings.tsx:17 |
54 | - __( 'Attendees are shown whenever this post is listed in an archive view.', 'event_espresso' ), |
|
54 | + __('Attendees are shown whenever this post is listed in an archive view.', 'event_espresso'), |
|
55 | 55 | |
56 | 56 | // Reference: domains/core/admin/blocks/src/event-attendees/controls/ArchiveSettings.tsx:18 |
57 | - __( 'Attendees are hidden whenever this post is listed in an archive view.', 'event_espresso' ), |
|
57 | + __('Attendees are hidden whenever this post is listed in an archive view.', 'event_espresso'), |
|
58 | 58 | |
59 | 59 | // Reference: domains/core/admin/blocks/src/event-attendees/controls/AttendeeLimit.tsx:29 |
60 | - __( 'Number of Attendees to Display:', 'event_espresso' ), |
|
60 | + __('Number of Attendees to Display:', 'event_espresso'), |
|
61 | 61 | |
62 | 62 | // Reference: domains/core/admin/blocks/src/event-attendees/controls/AttendeeLimit.tsx:34 |
63 | 63 | /* translators: %d attendees count */ |
64 | - _n_noop( 'Used to adjust the number of attendees displayed (There is %d total attendee for the current filter settings).', 'Used to adjust the number of attendees displayed (There are %d total attendees for the current filter settings).', 'event_espresso' ), |
|
64 | + _n_noop('Used to adjust the number of attendees displayed (There is %d total attendee for the current filter settings).', 'Used to adjust the number of attendees displayed (There are %d total attendees for the current filter settings).', 'event_espresso'), |
|
65 | 65 | |
66 | 66 | // Reference: domains/core/admin/blocks/src/event-attendees/controls/GravatarSettings.tsx:27 |
67 | - __( 'Display Gravatar', 'event_espresso' ), |
|
67 | + __('Display Gravatar', 'event_espresso'), |
|
68 | 68 | |
69 | 69 | // Reference: domains/core/admin/blocks/src/event-attendees/controls/GravatarSettings.tsx:32 |
70 | - __( 'Gravatar images are shown for each attendee.', 'event_espresso' ), |
|
70 | + __('Gravatar images are shown for each attendee.', 'event_espresso'), |
|
71 | 71 | |
72 | 72 | // Reference: domains/core/admin/blocks/src/event-attendees/controls/GravatarSettings.tsx:33 |
73 | - __( 'No gravatar images are shown for each attendee.', 'event_espresso' ), |
|
73 | + __('No gravatar images are shown for each attendee.', 'event_espresso'), |
|
74 | 74 | |
75 | 75 | // Reference: domains/core/admin/blocks/src/event-attendees/controls/GravatarSettings.tsx:38 |
76 | - __( 'Size of Gravatar', 'event_espresso' ), |
|
76 | + __('Size of Gravatar', 'event_espresso'), |
|
77 | 77 | |
78 | 78 | // Reference: domains/core/admin/blocks/src/event-attendees/controls/SelectDatetime.tsx:22 |
79 | - __( 'Select Datetime', 'event_espresso' ), |
|
79 | + __('Select Datetime', 'event_espresso'), |
|
80 | 80 | |
81 | 81 | // Reference: domains/core/admin/blocks/src/event-attendees/controls/SelectEvent.tsx:22 |
82 | 82 | // Reference: domains/core/admin/blocks/src/event/controls/SelectEvent.tsx:22 |
83 | - __( 'Select Event', 'event_espresso' ), |
|
83 | + __('Select Event', 'event_espresso'), |
|
84 | 84 | |
85 | 85 | // Reference: domains/core/admin/blocks/src/event-attendees/controls/SelectOrderBy.tsx:11 |
86 | - __( 'Attendee id', 'event_espresso' ), |
|
86 | + __('Attendee id', 'event_espresso'), |
|
87 | 87 | |
88 | 88 | // Reference: domains/core/admin/blocks/src/event-attendees/controls/SelectOrderBy.tsx:15 |
89 | - __( 'Last name only', 'event_espresso' ), |
|
89 | + __('Last name only', 'event_espresso'), |
|
90 | 90 | |
91 | 91 | // Reference: domains/core/admin/blocks/src/event-attendees/controls/SelectOrderBy.tsx:19 |
92 | - __( 'First name only', 'event_espresso' ), |
|
92 | + __('First name only', 'event_espresso'), |
|
93 | 93 | |
94 | 94 | // Reference: domains/core/admin/blocks/src/event-attendees/controls/SelectOrderBy.tsx:23 |
95 | - __( 'First, then Last name', 'event_espresso' ), |
|
95 | + __('First, then Last name', 'event_espresso'), |
|
96 | 96 | |
97 | 97 | // Reference: domains/core/admin/blocks/src/event-attendees/controls/SelectOrderBy.tsx:27 |
98 | - __( 'Last, then First name', 'event_espresso' ), |
|
98 | + __('Last, then First name', 'event_espresso'), |
|
99 | 99 | |
100 | 100 | // Reference: domains/core/admin/blocks/src/event-attendees/controls/SelectOrderBy.tsx:41 |
101 | - __( 'Order Attendees by:', 'event_espresso' ), |
|
101 | + __('Order Attendees by:', 'event_espresso'), |
|
102 | 102 | |
103 | 103 | // Reference: domains/core/admin/blocks/src/event-attendees/controls/SelectTicket.tsx:22 |
104 | - __( 'Select Ticket', 'event_espresso' ), |
|
104 | + __('Select Ticket', 'event_espresso'), |
|
105 | 105 | |
106 | 106 | // Reference: domains/core/admin/blocks/src/event-attendees/controls/index.tsx:21 |
107 | - __( 'Filter By Settings', 'event_espresso' ), |
|
107 | + __('Filter By Settings', 'event_espresso'), |
|
108 | 108 | |
109 | 109 | // Reference: domains/core/admin/blocks/src/event-attendees/controls/index.tsx:36 |
110 | - __( 'Gravatar Setttings', 'event_espresso' ), |
|
110 | + __('Gravatar Setttings', 'event_espresso'), |
|
111 | 111 | |
112 | 112 | // Reference: domains/core/admin/blocks/src/event-attendees/controls/index.tsx:39 |
113 | - __( 'Archive Settings', 'event_espresso' ), |
|
113 | + __('Archive Settings', 'event_espresso'), |
|
114 | 114 | |
115 | 115 | // Reference: domains/core/admin/blocks/src/event-attendees/index.tsx:10 |
116 | - __( 'Event Attendees', 'event_espresso' ), |
|
116 | + __('Event Attendees', 'event_espresso'), |
|
117 | 117 | |
118 | 118 | // Reference: domains/core/admin/blocks/src/event-attendees/index.tsx:11 |
119 | - __( 'Displays a list of people that have registered for the specified event', 'event_espresso' ), |
|
119 | + __('Displays a list of people that have registered for the specified event', 'event_espresso'), |
|
120 | 120 | |
121 | 121 | // Reference: domains/core/admin/blocks/src/event-attendees/index.tsx:14 |
122 | 122 | // Reference: domains/core/admin/blocks/src/event/index.tsx:12 |
123 | 123 | // Reference: packages/edtr-services/src/constants.ts:25 |
124 | - __( 'event', 'event_espresso' ), |
|
124 | + __('event', 'event_espresso'), |
|
125 | 125 | |
126 | 126 | // Reference: domains/core/admin/blocks/src/event-attendees/index.tsx:14 |
127 | - __( 'attendees', 'event_espresso' ), |
|
127 | + __('attendees', 'event_espresso'), |
|
128 | 128 | |
129 | 129 | // Reference: domains/core/admin/blocks/src/event-attendees/index.tsx:14 |
130 | - __( 'list', 'event_espresso' ), |
|
130 | + __('list', 'event_espresso'), |
|
131 | 131 | |
132 | 132 | // Reference: domains/core/admin/blocks/src/event/DisplayField.tsx:41 |
133 | - __( 'An unknown error occurred while fetching event details.', 'event_espresso' ), |
|
133 | + __('An unknown error occurred while fetching event details.', 'event_espresso'), |
|
134 | 134 | |
135 | 135 | // Reference: domains/core/admin/blocks/src/event/controls/SelectField.tsx:10 |
136 | 136 | // Reference: domains/core/admin/blocks/src/services/utils.ts:24 |
137 | 137 | // Reference: packages/utils/src/list/index.ts:13 |
138 | - __( 'Select…', 'event_espresso' ), |
|
138 | + __('Select…', 'event_espresso'), |
|
139 | 139 | |
140 | 140 | // Reference: domains/core/admin/blocks/src/event/controls/SelectField.tsx:15 |
141 | 141 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/useDateFormConfig.ts:75 |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:189 |
145 | 145 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/useBulkEditFormConfig.ts:48 |
146 | 146 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/tableView/useHeaderRowGenerator.tsx:42 |
147 | - __( 'Name', 'event_espresso' ), |
|
147 | + __('Name', 'event_espresso'), |
|
148 | 148 | |
149 | 149 | // Reference: domains/core/admin/blocks/src/event/controls/SelectField.tsx:19 |
150 | 150 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/useDateFormConfig.ts:80 |
@@ -152,411 +152,411 @@ discard block |
||
152 | 152 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:194 |
153 | 153 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/useBulkEditFormConfig.ts:54 |
154 | 154 | // Reference: packages/tpc/src/components/table/useHeaderRowGenerator.ts:47 |
155 | - __( 'Description', 'event_espresso' ), |
|
155 | + __('Description', 'event_espresso'), |
|
156 | 156 | |
157 | 157 | // Reference: domains/core/admin/blocks/src/event/controls/SelectField.tsx:23 |
158 | - __( 'Short description', 'event_espresso' ), |
|
158 | + __('Short description', 'event_espresso'), |
|
159 | 159 | |
160 | 160 | // Reference: domains/core/admin/blocks/src/event/controls/SelectField.tsx:35 |
161 | - __( 'Select Field', 'event_espresso' ), |
|
161 | + __('Select Field', 'event_espresso'), |
|
162 | 162 | |
163 | 163 | // Reference: domains/core/admin/blocks/src/event/controls/index.tsx:27 |
164 | - __( 'Text Color', 'event_espresso' ), |
|
164 | + __('Text Color', 'event_espresso'), |
|
165 | 165 | |
166 | 166 | // Reference: domains/core/admin/blocks/src/event/controls/index.tsx:32 |
167 | - __( 'Background Color', 'event_espresso' ), |
|
167 | + __('Background Color', 'event_espresso'), |
|
168 | 168 | |
169 | 169 | // Reference: domains/core/admin/blocks/src/event/controls/index.tsx:41 |
170 | 170 | // Reference: packages/form-builder/src/FormElement/Tabs/FormElementTabs.tsx:22 |
171 | 171 | // Reference: packages/form-builder/src/FormSection/Tabs/FormSectionTabs.tsx:21 |
172 | - __( 'Settings', 'event_espresso' ), |
|
172 | + __('Settings', 'event_espresso'), |
|
173 | 173 | |
174 | 174 | // Reference: domains/core/admin/blocks/src/event/controls/index.tsx:45 |
175 | - __( 'Typography', 'event_espresso' ), |
|
175 | + __('Typography', 'event_espresso'), |
|
176 | 176 | |
177 | 177 | // Reference: domains/core/admin/blocks/src/event/controls/index.tsx:48 |
178 | - __( 'Color', 'event_espresso' ), |
|
178 | + __('Color', 'event_espresso'), |
|
179 | 179 | |
180 | 180 | // Reference: domains/core/admin/blocks/src/event/index.tsx:12 |
181 | - __( 'field', 'event_espresso' ), |
|
181 | + __('field', 'event_espresso'), |
|
182 | 182 | |
183 | 183 | // Reference: domains/core/admin/blocks/src/event/index.tsx:8 |
184 | - __( 'Event Field', 'event_espresso' ), |
|
184 | + __('Event Field', 'event_espresso'), |
|
185 | 185 | |
186 | 186 | // Reference: domains/core/admin/blocks/src/event/index.tsx:9 |
187 | - __( 'Displays the selected field of an event', 'event_espresso' ), |
|
187 | + __('Displays the selected field of an event', 'event_espresso'), |
|
188 | 188 | |
189 | 189 | // Reference: domains/core/admin/blocks/src/services/utils.ts:17 |
190 | - __( 'Error', 'event_espresso' ), |
|
190 | + __('Error', 'event_espresso'), |
|
191 | 191 | |
192 | 192 | // Reference: domains/core/admin/blocks/src/services/utils.ts:9 |
193 | - __( 'Loading…', 'event_espresso' ), |
|
193 | + __('Loading…', 'event_espresso'), |
|
194 | 194 | |
195 | 195 | // Reference: domains/core/admin/eventEditor/src/ui/EventDescription.tsx:33 |
196 | - __( 'Event Description', 'event_espresso' ), |
|
196 | + __('Event Description', 'event_espresso'), |
|
197 | 197 | |
198 | 198 | // Reference: domains/core/admin/eventEditor/src/ui/EventRegistrationOptions/ActiveStatus.tsx:28 |
199 | - __( 'Active status', 'event_espresso' ), |
|
199 | + __('Active status', 'event_espresso'), |
|
200 | 200 | |
201 | 201 | // Reference: domains/core/admin/eventEditor/src/ui/EventRegistrationOptions/AltRegPage.tsx:12 |
202 | - __( 'Alternative Registration Page', 'event_espresso' ), |
|
202 | + __('Alternative Registration Page', 'event_espresso'), |
|
203 | 203 | |
204 | 204 | // Reference: domains/core/admin/eventEditor/src/ui/EventRegistrationOptions/DefaultRegistrationStatus.tsx:25 |
205 | - __( 'Default Registration Status', 'event_espresso' ), |
|
205 | + __('Default Registration Status', 'event_espresso'), |
|
206 | 206 | |
207 | 207 | // Reference: domains/core/admin/eventEditor/src/ui/EventRegistrationOptions/Donations.tsx:8 |
208 | - __( 'Donations Enabled', 'event_espresso' ), |
|
208 | + __('Donations Enabled', 'event_espresso'), |
|
209 | 209 | |
210 | 210 | // Reference: domains/core/admin/eventEditor/src/ui/EventRegistrationOptions/Donations.tsx:8 |
211 | - __( 'Donations Disabled', 'event_espresso' ), |
|
211 | + __('Donations Disabled', 'event_espresso'), |
|
212 | 212 | |
213 | 213 | // Reference: domains/core/admin/eventEditor/src/ui/EventRegistrationOptions/EventManager.tsx:16 |
214 | - __( 'Event Manager', 'event_espresso' ), |
|
214 | + __('Event Manager', 'event_espresso'), |
|
215 | 215 | |
216 | 216 | // Reference: domains/core/admin/eventEditor/src/ui/EventRegistrationOptions/EventPhoneNumber.tsx:15 |
217 | - __( 'Event Phone Number', 'event_espresso' ), |
|
217 | + __('Event Phone Number', 'event_espresso'), |
|
218 | 218 | |
219 | 219 | // Reference: domains/core/admin/eventEditor/src/ui/EventRegistrationOptions/MaxRegistrations.tsx:13 |
220 | - __( 'Max Registrations per Transaction', 'event_espresso' ), |
|
220 | + __('Max Registrations per Transaction', 'event_espresso'), |
|
221 | 221 | |
222 | 222 | // Reference: domains/core/admin/eventEditor/src/ui/EventRegistrationOptions/TicketSelector.tsx:8 |
223 | - __( 'Ticket Selector Enabled', 'event_espresso' ), |
|
223 | + __('Ticket Selector Enabled', 'event_espresso'), |
|
224 | 224 | |
225 | 225 | // Reference: domains/core/admin/eventEditor/src/ui/EventRegistrationOptions/TicketSelector.tsx:8 |
226 | - __( 'Ticket Selector Disabled', 'event_espresso' ), |
|
226 | + __('Ticket Selector Disabled', 'event_espresso'), |
|
227 | 227 | |
228 | 228 | // Reference: domains/core/admin/eventEditor/src/ui/EventRegistrationOptions/index.tsx:41 |
229 | - __( 'Event Details', 'event_espresso' ), |
|
229 | + __('Event Details', 'event_espresso'), |
|
230 | 230 | |
231 | 231 | // Reference: domains/core/admin/eventEditor/src/ui/EventRegistrationOptions/index.tsx:47 |
232 | - __( 'Registration Options', 'event_espresso' ), |
|
232 | + __('Registration Options', 'event_espresso'), |
|
233 | 233 | |
234 | 234 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/multiStep/DateFormSteps.tsx:10 |
235 | - __( 'primary information about the date', 'event_espresso' ), |
|
235 | + __('primary information about the date', 'event_espresso'), |
|
236 | 236 | |
237 | 237 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/multiStep/DateFormSteps.tsx:10 |
238 | - __( 'Date Details', 'event_espresso' ), |
|
238 | + __('Date Details', 'event_espresso'), |
|
239 | 239 | |
240 | 240 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/multiStep/DateFormSteps.tsx:11 |
241 | 241 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/defaultTickets/multiStep/TicketFormSteps.tsx:16 |
242 | 242 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/multiStep/TicketFormSteps.tsx:16 |
243 | - __( 'relations between tickets and dates', 'event_espresso' ), |
|
243 | + __('relations between tickets and dates', 'event_espresso'), |
|
244 | 244 | |
245 | 245 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/multiStep/DateFormSteps.tsx:11 |
246 | - __( 'Assign Tickets', 'event_espresso' ), |
|
246 | + __('Assign Tickets', 'event_espresso'), |
|
247 | 247 | |
248 | 248 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/multiStep/FooterButtons.tsx:22 |
249 | - __( 'Save and assign tickets', 'event_espresso' ), |
|
249 | + __('Save and assign tickets', 'event_espresso'), |
|
250 | 250 | |
251 | 251 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/multiStep/Modal.tsx:30 |
252 | 252 | /* translators: %d database id */ |
253 | - __( 'Edit datetime %s', 'event_espresso' ), |
|
253 | + __('Edit datetime %s', 'event_espresso'), |
|
254 | 254 | |
255 | 255 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/multiStep/Modal.tsx:33 |
256 | - __( 'New Datetime', 'event_espresso' ), |
|
256 | + __('New Datetime', 'event_espresso'), |
|
257 | 257 | |
258 | 258 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/multiStep/Modal.tsx:43 |
259 | - __( 'modal for datetime', 'event_espresso' ), |
|
259 | + __('modal for datetime', 'event_espresso'), |
|
260 | 260 | |
261 | 261 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/useDateFormConfig.ts:110 |
262 | 262 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/details/useBulkEditFormConfig.ts:107 |
263 | 263 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:224 |
264 | 264 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/useBulkEditFormConfig.ts:106 |
265 | - __( 'Details', 'event_espresso' ), |
|
265 | + __('Details', 'event_espresso'), |
|
266 | 266 | |
267 | 267 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/useDateFormConfig.ts:114 |
268 | 268 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/details/useBulkEditFormConfig.ts:111 |
269 | 269 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/tableView/useHeaderRowGenerator.tsx:83 |
270 | - __( 'Capacity', 'event_espresso' ), |
|
270 | + __('Capacity', 'event_espresso'), |
|
271 | 271 | |
272 | 272 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/useDateFormConfig.ts:119 |
273 | - __( 'The maximum number of registrants that can attend the event at this particular date.', 'event_espresso' ), |
|
273 | + __('The maximum number of registrants that can attend the event at this particular date.', 'event_espresso'), |
|
274 | 274 | |
275 | 275 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/useDateFormConfig.ts:123 |
276 | - __( 'Set to 0 to close registration or leave blank for no limit.', 'event_espresso' ), |
|
276 | + __('Set to 0 to close registration or leave blank for no limit.', 'event_espresso'), |
|
277 | 277 | |
278 | 278 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/useDateFormConfig.ts:129 |
279 | 279 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:164 |
280 | - __( 'Trash', 'event_espresso' ), |
|
280 | + __('Trash', 'event_espresso'), |
|
281 | 281 | |
282 | 282 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/useDateFormConfig.ts:71 |
283 | 283 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/details/useBulkEditFormConfig.ts:44 |
284 | 284 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:185 |
285 | 285 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/useBulkEditFormConfig.ts:44 |
286 | - __( 'Basics', 'event_espresso' ), |
|
286 | + __('Basics', 'event_espresso'), |
|
287 | 287 | |
288 | 288 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/useDateFormConfig.ts:88 |
289 | 289 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/details/useBulkEditFormConfig.ts:62 |
290 | 290 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/useBulkEditFormConfig.ts:62 |
291 | - __( 'Dates', 'event_espresso' ), |
|
291 | + __('Dates', 'event_espresso'), |
|
292 | 292 | |
293 | 293 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/useDateFormConfig.ts:92 |
294 | 294 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/tableView/useHeaderRowGenerator.tsx:53 |
295 | 295 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:206 |
296 | - __( 'Start Date', 'event_espresso' ), |
|
296 | + __('Start Date', 'event_espresso'), |
|
297 | 297 | |
298 | 298 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/useDateFormConfig.ts:99 |
299 | 299 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/tableView/useHeaderRowGenerator.tsx:67 |
300 | 300 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:213 |
301 | - __( 'End Date', 'event_espresso' ), |
|
301 | + __('End Date', 'event_espresso'), |
|
302 | 302 | |
303 | 303 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/DateRegistrationsLink.tsx:25 |
304 | 304 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/TicketRegistrationsLink.tsx:13 |
305 | - __( 'total registrations.', 'event_espresso' ), |
|
305 | + __('total registrations.', 'event_espresso'), |
|
306 | 306 | |
307 | 307 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/DateRegistrationsLink.tsx:26 |
308 | - __( 'view ALL registrations for this date.', 'event_espresso' ), |
|
308 | + __('view ALL registrations for this date.', 'event_espresso'), |
|
309 | 309 | |
310 | 310 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/DateSoldLink.tsx:13 |
311 | - __( 'view approved registrations for this date.', 'event_espresso' ), |
|
311 | + __('view approved registrations for this date.', 'event_espresso'), |
|
312 | 312 | |
313 | 313 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/DatesList.tsx:35 |
314 | 314 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/tableView/TableView.tsx:33 |
315 | - __( 'Event Dates', 'event_espresso' ), |
|
315 | + __('Event Dates', 'event_espresso'), |
|
316 | 316 | |
317 | 317 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/DatesList.tsx:38 |
318 | - __( 'loading event dates…', 'event_espresso' ), |
|
318 | + __('loading event dates…', 'event_espresso'), |
|
319 | 319 | |
320 | 320 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/DatesListButtons.tsx:20 |
321 | - __( 'Add a date or a ticket in order to use Ticket Assignment Manager', 'event_espresso' ), |
|
321 | + __('Add a date or a ticket in order to use Ticket Assignment Manager', 'event_espresso'), |
|
322 | 322 | |
323 | 323 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/DatesListButtons.tsx:30 |
324 | - __( 'Ticket Assignments', 'event_espresso' ), |
|
324 | + __('Ticket Assignments', 'event_espresso'), |
|
325 | 325 | |
326 | 326 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/actionsMenu/AssignTicketsButton.tsx:25 |
327 | - __( 'Number of related tickets', 'event_espresso' ), |
|
327 | + __('Number of related tickets', 'event_espresso'), |
|
328 | 328 | |
329 | 329 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/actionsMenu/AssignTicketsButton.tsx:26 |
330 | - __( 'There are no tickets assigned to this datetime. Please click the ticket icon to update the assignments.', 'event_espresso' ), |
|
330 | + __('There are no tickets assigned to this datetime. Please click the ticket icon to update the assignments.', 'event_espresso'), |
|
331 | 331 | |
332 | 332 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/actionsMenu/AssignTicketsButton.tsx:34 |
333 | - __( 'assign tickets', 'event_espresso' ), |
|
333 | + __('assign tickets', 'event_espresso'), |
|
334 | 334 | |
335 | 335 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/actionsMenu/dropdown/DateMainMenu.tsx:21 |
336 | - __( 'event datetime main menu', 'event_espresso' ), |
|
336 | + __('event datetime main menu', 'event_espresso'), |
|
337 | 337 | |
338 | 338 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/actionsMenu/dropdown/DateMainMenu.tsx:33 |
339 | - __( 'edit datetime', 'event_espresso' ), |
|
339 | + __('edit datetime', 'event_espresso'), |
|
340 | 340 | |
341 | 341 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/actionsMenu/dropdown/DateMainMenu.tsx:34 |
342 | - __( 'copy datetime', 'event_espresso' ), |
|
342 | + __('copy datetime', 'event_espresso'), |
|
343 | 343 | |
344 | 344 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/actionsMenu/dropdown/DeleteDatetime.tsx:15 |
345 | 345 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/actionsMenu/dropdown/DeleteTicket.tsx:48 |
346 | - __( 'delete permanently', 'event_espresso' ), |
|
346 | + __('delete permanently', 'event_espresso'), |
|
347 | 347 | |
348 | 348 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/actionsMenu/dropdown/DeleteDatetime.tsx:15 |
349 | - __( 'trash datetime', 'event_espresso' ), |
|
349 | + __('trash datetime', 'event_espresso'), |
|
350 | 350 | |
351 | 351 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/actionsMenu/dropdown/DeleteDatetime.tsx:18 |
352 | - __( 'Permanently Delete Datetime?', 'event_espresso' ), |
|
352 | + __('Permanently Delete Datetime?', 'event_espresso'), |
|
353 | 353 | |
354 | 354 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/actionsMenu/dropdown/DeleteDatetime.tsx:18 |
355 | - __( 'Move Datetime to Trash?', 'event_espresso' ), |
|
355 | + __('Move Datetime to Trash?', 'event_espresso'), |
|
356 | 356 | |
357 | 357 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/actionsMenu/dropdown/DeleteDatetime.tsx:20 |
358 | - __( 'Are you sure you want to permanently delete this datetime? This action is permanent and can not be undone.', 'event_espresso' ), |
|
358 | + __('Are you sure you want to permanently delete this datetime? This action is permanent and can not be undone.', 'event_espresso'), |
|
359 | 359 | |
360 | 360 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/actionsMenu/dropdown/DeleteDatetime.tsx:23 |
361 | - __( 'Are you sure you want to move this datetime to the trash? You can "untrash" this datetime later if you need to.', 'event_espresso' ), |
|
361 | + __('Are you sure you want to move this datetime to the trash? You can "untrash" this datetime later if you need to.', 'event_espresso'), |
|
362 | 362 | |
363 | 363 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/actionsMenu/dropdown/DeleteDatetime.tsx:33 |
364 | - __( 'delete', 'event_espresso' ), |
|
364 | + __('delete', 'event_espresso'), |
|
365 | 365 | |
366 | 366 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/actions/Actions.tsx:34 |
367 | 367 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/actions/Actions.tsx:39 |
368 | 368 | // Reference: packages/ui-components/src/bulkEdit/BulkActions.tsx:43 |
369 | - __( 'bulk actions', 'event_espresso' ), |
|
369 | + __('bulk actions', 'event_espresso'), |
|
370 | 370 | |
371 | 371 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/actions/Actions.tsx:38 |
372 | - __( 'edit datetime details', 'event_espresso' ), |
|
372 | + __('edit datetime details', 'event_espresso'), |
|
373 | 373 | |
374 | 374 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/actions/Actions.tsx:42 |
375 | - __( 'delete datetimes', 'event_espresso' ), |
|
375 | + __('delete datetimes', 'event_espresso'), |
|
376 | 376 | |
377 | 377 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/actions/Actions.tsx:42 |
378 | - __( 'trash datetimes', 'event_espresso' ), |
|
378 | + __('trash datetimes', 'event_espresso'), |
|
379 | 379 | |
380 | 380 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/delete/Delete.tsx:14 |
381 | - __( 'Are you sure you want to permanently delete these datetimes? This action can NOT be undone!', 'event_espresso' ), |
|
381 | + __('Are you sure you want to permanently delete these datetimes? This action can NOT be undone!', 'event_espresso'), |
|
382 | 382 | |
383 | 383 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/delete/Delete.tsx:15 |
384 | - __( 'Are you sure you want to trash these datetimes?', 'event_espresso' ), |
|
384 | + __('Are you sure you want to trash these datetimes?', 'event_espresso'), |
|
385 | 385 | |
386 | 386 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/delete/Delete.tsx:16 |
387 | - __( 'Delete datetimes permanently', 'event_espresso' ), |
|
387 | + __('Delete datetimes permanently', 'event_espresso'), |
|
388 | 388 | |
389 | 389 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/delete/Delete.tsx:16 |
390 | - __( 'Trash datetimes', 'event_espresso' ), |
|
390 | + __('Trash datetimes', 'event_espresso'), |
|
391 | 391 | |
392 | 392 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/details/EditDetails.tsx:21 |
393 | - __( 'Bulk edit date details', 'event_espresso' ), |
|
393 | + __('Bulk edit date details', 'event_espresso'), |
|
394 | 394 | |
395 | 395 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/details/EditDetails.tsx:22 |
396 | - __( 'any changes will be applied to ALL of the selected dates.', 'event_espresso' ), |
|
396 | + __('any changes will be applied to ALL of the selected dates.', 'event_espresso'), |
|
397 | 397 | |
398 | 398 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/details/formValidation.ts:12 |
399 | 399 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/formValidation.ts:12 |
400 | - __( 'Name must be at least three characters', 'event_espresso' ), |
|
400 | + __('Name must be at least three characters', 'event_espresso'), |
|
401 | 401 | |
402 | 402 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/details/useBulkEditFormConfig.ts:66 |
403 | 403 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/useBulkEditFormConfig.ts:66 |
404 | - __( 'Shift dates', 'event_espresso' ), |
|
404 | + __('Shift dates', 'event_espresso'), |
|
405 | 405 | |
406 | 406 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/details/useBulkEditFormConfig.ts:91 |
407 | 407 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/useBulkEditFormConfig.ts:90 |
408 | - __( 'earlier', 'event_espresso' ), |
|
408 | + __('earlier', 'event_espresso'), |
|
409 | 409 | |
410 | 410 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/details/useBulkEditFormConfig.ts:95 |
411 | 411 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/useBulkEditFormConfig.ts:94 |
412 | - __( 'later', 'event_espresso' ), |
|
412 | + __('later', 'event_espresso'), |
|
413 | 413 | |
414 | 414 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/cardView/DateCapacity.tsx:31 |
415 | 415 | /* translators: click to edit capacity<linebreak>(registration limit)… */ |
416 | - __( 'click to edit capacity%s(registration limit)…', 'event_espresso' ), |
|
416 | + __('click to edit capacity%s(registration limit)…', 'event_espresso'), |
|
417 | 417 | |
418 | 418 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/cardView/DateCardSidebar.tsx:31 |
419 | 419 | // Reference: packages/ee-components/src/SimpleTicketCard/SimpleTicketCard.tsx:27 |
420 | 420 | // Reference: packages/ui-components/src/CalendarDateSwitcher/CalendarDateSwitcher.tsx:34 |
421 | - __( 'starts', 'event_espresso' ), |
|
421 | + __('starts', 'event_espresso'), |
|
422 | 422 | |
423 | 423 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/cardView/DateCardSidebar.tsx:32 |
424 | 424 | // Reference: packages/ee-components/src/SimpleTicketCard/SimpleTicketCard.tsx:34 |
425 | 425 | // Reference: packages/ui-components/src/CalendarDateSwitcher/CalendarDateSwitcher.tsx:47 |
426 | - __( 'ends', 'event_espresso' ), |
|
426 | + __('ends', 'event_espresso'), |
|
427 | 427 | |
428 | 428 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/cardView/DateCardSidebar.tsx:32 |
429 | - __( 'started', 'event_espresso' ), |
|
429 | + __('started', 'event_espresso'), |
|
430 | 430 | |
431 | 431 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/cardView/DateCardSidebar.tsx:32 |
432 | - __( 'ended', 'event_espresso' ), |
|
432 | + __('ended', 'event_espresso'), |
|
433 | 433 | |
434 | 434 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/cardView/DateCardSidebar.tsx:46 |
435 | - __( 'Edit Event Date', 'event_espresso' ), |
|
435 | + __('Edit Event Date', 'event_espresso'), |
|
436 | 436 | |
437 | 437 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/cardView/DateCardSidebar.tsx:50 |
438 | - __( 'edit start and end dates', 'event_espresso' ), |
|
438 | + __('edit start and end dates', 'event_espresso'), |
|
439 | 439 | |
440 | 440 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/cardView/DateDetailsPanel.tsx:16 |
441 | 441 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/cardView/TicketDetailsPanel.tsx:16 |
442 | - __( 'sold', 'event_espresso' ), |
|
442 | + __('sold', 'event_espresso'), |
|
443 | 443 | |
444 | 444 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/cardView/DateDetailsPanel.tsx:21 |
445 | - __( 'capacity', 'event_espresso' ), |
|
445 | + __('capacity', 'event_espresso'), |
|
446 | 446 | |
447 | 447 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/cardView/DateDetailsPanel.tsx:27 |
448 | 448 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/cardView/TicketDetailsPanel.tsx:26 |
449 | - __( 'reg list', 'event_espresso' ), |
|
449 | + __('reg list', 'event_espresso'), |
|
450 | 450 | |
451 | 451 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/cardView/Details.tsx:43 |
452 | 452 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/cardView/Details.tsx:35 |
453 | - __( 'add description…', 'event_espresso' ), |
|
453 | + __('add description…', 'event_espresso'), |
|
454 | 454 | |
455 | 455 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/cardView/Details.tsx:44 |
456 | 456 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/cardView/Details.tsx:36 |
457 | - __( 'Edit description', 'event_espresso' ), |
|
457 | + __('Edit description', 'event_espresso'), |
|
458 | 458 | |
459 | 459 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/cardView/Details.tsx:45 |
460 | 460 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/cardView/Details.tsx:37 |
461 | - __( 'click to edit description…', 'event_espresso' ), |
|
461 | + __('click to edit description…', 'event_espresso'), |
|
462 | 462 | |
463 | 463 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/config.ts:14 |
464 | - __( 'View Registrations for this Date', 'event_espresso' ), |
|
464 | + __('View Registrations for this Date', 'event_espresso'), |
|
465 | 465 | |
466 | 466 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/config.ts:19 |
467 | - __( 'Manage Ticket Assignments', 'event_espresso' ), |
|
467 | + __('Manage Ticket Assignments', 'event_espresso'), |
|
468 | 468 | |
469 | 469 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/config.ts:24 |
470 | - __( 'Move Date to Trash', 'event_espresso' ), |
|
470 | + __('Move Date to Trash', 'event_espresso'), |
|
471 | 471 | |
472 | 472 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/config.ts:29 |
473 | 473 | // Reference: packages/constants/src/datetime.ts:6 |
474 | - __( 'Active', 'event_espresso' ), |
|
474 | + __('Active', 'event_espresso'), |
|
475 | 475 | |
476 | 476 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/config.ts:30 |
477 | 477 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/config.ts:29 |
478 | - __( 'Trashed', 'event_espresso' ), |
|
478 | + __('Trashed', 'event_espresso'), |
|
479 | 479 | |
480 | 480 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/config.ts:31 |
481 | 481 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/config.ts:30 |
482 | 482 | // Reference: packages/constants/src/datetime.ts:8 |
483 | - __( 'Expired', 'event_espresso' ), |
|
483 | + __('Expired', 'event_espresso'), |
|
484 | 484 | |
485 | 485 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/config.ts:32 |
486 | 486 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/config.ts:32 |
487 | - __( 'Sold Out', 'event_espresso' ), |
|
487 | + __('Sold Out', 'event_espresso'), |
|
488 | 488 | |
489 | 489 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/config.ts:33 |
490 | 490 | // Reference: packages/constants/src/datetime.ts:12 |
491 | - __( 'Upcoming', 'event_espresso' ), |
|
491 | + __('Upcoming', 'event_espresso'), |
|
492 | 492 | |
493 | 493 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/config.ts:9 |
494 | - __( 'Edit Event Date Details', 'event_espresso' ), |
|
494 | + __('Edit Event Date Details', 'event_espresso'), |
|
495 | 495 | |
496 | 496 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/editable/EditableName.tsx:41 |
497 | 497 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/editable/EditableName.tsx:41 |
498 | - __( 'click to edit title…', 'event_espresso' ), |
|
498 | + __('click to edit title…', 'event_espresso'), |
|
499 | 499 | |
500 | 500 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/editable/EditableName.tsx:42 |
501 | 501 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/editable/EditableName.tsx:42 |
502 | - __( 'add title…', 'event_espresso' ), |
|
502 | + __('add title…', 'event_espresso'), |
|
503 | 503 | |
504 | 504 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/ActiveDatesFilters.tsx:17 |
505 | 505 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/ActiveTicketsFilters.tsx:17 |
506 | - __( 'ON', 'event_espresso' ), |
|
506 | + __('ON', 'event_espresso'), |
|
507 | 507 | |
508 | 508 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:10 |
509 | - __( 'end dates only', 'event_espresso' ), |
|
509 | + __('end dates only', 'event_espresso'), |
|
510 | 510 | |
511 | 511 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:11 |
512 | - __( 'start and end dates', 'event_espresso' ), |
|
512 | + __('start and end dates', 'event_espresso'), |
|
513 | 513 | |
514 | 514 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:16 |
515 | - __( 'dates above 90% capacity', 'event_espresso' ), |
|
515 | + __('dates above 90% capacity', 'event_espresso'), |
|
516 | 516 | |
517 | 517 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:17 |
518 | - __( 'dates above 75% capacity', 'event_espresso' ), |
|
518 | + __('dates above 75% capacity', 'event_espresso'), |
|
519 | 519 | |
520 | 520 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:18 |
521 | - __( 'dates above 50% capacity', 'event_espresso' ), |
|
521 | + __('dates above 50% capacity', 'event_espresso'), |
|
522 | 522 | |
523 | 523 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:19 |
524 | - __( 'dates below 50% capacity', 'event_espresso' ), |
|
524 | + __('dates below 50% capacity', 'event_espresso'), |
|
525 | 525 | |
526 | 526 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:23 |
527 | - __( 'all dates', 'event_espresso' ), |
|
527 | + __('all dates', 'event_espresso'), |
|
528 | 528 | |
529 | 529 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:24 |
530 | - __( 'all active and upcoming', 'event_espresso' ), |
|
530 | + __('all active and upcoming', 'event_espresso'), |
|
531 | 531 | |
532 | 532 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:25 |
533 | - __( 'active dates only', 'event_espresso' ), |
|
533 | + __('active dates only', 'event_espresso'), |
|
534 | 534 | |
535 | 535 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:26 |
536 | - __( 'upcoming dates only', 'event_espresso' ), |
|
536 | + __('upcoming dates only', 'event_espresso'), |
|
537 | 537 | |
538 | 538 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:27 |
539 | - __( 'next active or upcoming only', 'event_espresso' ), |
|
539 | + __('next active or upcoming only', 'event_espresso'), |
|
540 | 540 | |
541 | 541 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:28 |
542 | - __( 'sold out dates only', 'event_espresso' ), |
|
542 | + __('sold out dates only', 'event_espresso'), |
|
543 | 543 | |
544 | 544 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:29 |
545 | - __( 'recently expired dates', 'event_espresso' ), |
|
545 | + __('recently expired dates', 'event_espresso'), |
|
546 | 546 | |
547 | 547 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:30 |
548 | - __( 'all expired dates', 'event_espresso' ), |
|
548 | + __('all expired dates', 'event_espresso'), |
|
549 | 549 | |
550 | 550 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:31 |
551 | - __( 'trashed dates only', 'event_espresso' ), |
|
551 | + __('trashed dates only', 'event_espresso'), |
|
552 | 552 | |
553 | 553 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:35 |
554 | 554 | // Reference: packages/dates/src/components/DateRangePicker/DateRangePickerLegend.tsx:9 |
555 | 555 | // Reference: packages/dates/src/components/DateRangePicker/index.tsx:61 |
556 | - __( 'start date', 'event_espresso' ), |
|
556 | + __('start date', 'event_espresso'), |
|
557 | 557 | |
558 | 558 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:36 |
559 | - __( 'name', 'event_espresso' ), |
|
559 | + __('name', 'event_espresso'), |
|
560 | 560 | |
561 | 561 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:37 |
562 | 562 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/tableView/useHeaderRowGenerator.tsx:33 |
@@ -564,176 +564,176 @@ discard block |
||
564 | 564 | // Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/table/HeaderCell.tsx:27 |
565 | 565 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/tableView/useHeaderRowGenerator.tsx:33 |
566 | 566 | // Reference: packages/tpc/src/components/table/useHeaderRowGenerator.ts:23 |
567 | - __( 'ID', 'event_espresso' ), |
|
567 | + __('ID', 'event_espresso'), |
|
568 | 568 | |
569 | 569 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:38 |
570 | 570 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:47 |
571 | - __( 'custom order', 'event_espresso' ), |
|
571 | + __('custom order', 'event_espresso'), |
|
572 | 572 | |
573 | 573 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:42 |
574 | 574 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:51 |
575 | - __( 'display', 'event_espresso' ), |
|
575 | + __('display', 'event_espresso'), |
|
576 | 576 | |
577 | 577 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:43 |
578 | - __( 'recurrence', 'event_espresso' ), |
|
578 | + __('recurrence', 'event_espresso'), |
|
579 | 579 | |
580 | 580 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:44 |
581 | 581 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:53 |
582 | - __( 'sales', 'event_espresso' ), |
|
582 | + __('sales', 'event_espresso'), |
|
583 | 583 | |
584 | 584 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:45 |
585 | 585 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:55 |
586 | - __( 'sort by', 'event_espresso' ), |
|
586 | + __('sort by', 'event_espresso'), |
|
587 | 587 | |
588 | 588 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:46 |
589 | 589 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:54 |
590 | 590 | // Reference: packages/ee-components/src/EntityList/EntityListFilterBar.tsx:38 |
591 | - __( 'search', 'event_espresso' ), |
|
591 | + __('search', 'event_espresso'), |
|
592 | 592 | |
593 | 593 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:47 |
594 | 594 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:56 |
595 | - __( 'status', 'event_espresso' ), |
|
595 | + __('status', 'event_espresso'), |
|
596 | 596 | |
597 | 597 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:9 |
598 | - __( 'start dates only', 'event_espresso' ), |
|
598 | + __('start dates only', 'event_espresso'), |
|
599 | 599 | |
600 | 600 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/newDateOptions/AddSingleDate.tsx:26 |
601 | 601 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/newDateOptions/NewDateModal.tsx:12 |
602 | 602 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/newDateOptions/OptionsModalButton.tsx:18 |
603 | - __( 'Add New Date', 'event_espresso' ), |
|
603 | + __('Add New Date', 'event_espresso'), |
|
604 | 604 | |
605 | 605 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/newDateOptions/AddSingleDate.tsx:26 |
606 | - __( 'Add Single Date', 'event_espresso' ), |
|
606 | + __('Add Single Date', 'event_espresso'), |
|
607 | 607 | |
608 | 608 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/newDateOptions/AddSingleDate.tsx:44 |
609 | - __( 'Add a single date that only occurs once', 'event_espresso' ), |
|
609 | + __('Add a single date that only occurs once', 'event_espresso'), |
|
610 | 610 | |
611 | 611 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/newDateOptions/AddSingleDate.tsx:46 |
612 | - __( 'Single Date', 'event_espresso' ), |
|
612 | + __('Single Date', 'event_espresso'), |
|
613 | 613 | |
614 | 614 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/tableView/useHeaderRowGenerator.tsx:108 |
615 | - __( 'Reg list', 'event_espresso' ), |
|
615 | + __('Reg list', 'event_espresso'), |
|
616 | 616 | |
617 | 617 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/tableView/useHeaderRowGenerator.tsx:109 |
618 | - __( 'Regs', 'event_espresso' ), |
|
618 | + __('Regs', 'event_espresso'), |
|
619 | 619 | |
620 | 620 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/tableView/useHeaderRowGenerator.tsx:124 |
621 | 621 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/tableView/useHeaderRowGenerator.tsx:123 |
622 | 622 | // Reference: packages/tpc/src/components/table/useHeaderRowGenerator.ts:59 |
623 | - __( 'Actions', 'event_espresso' ), |
|
623 | + __('Actions', 'event_espresso'), |
|
624 | 624 | |
625 | 625 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/tableView/useHeaderRowGenerator.tsx:54 |
626 | - __( 'Start', 'event_espresso' ), |
|
626 | + __('Start', 'event_espresso'), |
|
627 | 627 | |
628 | 628 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/tableView/useHeaderRowGenerator.tsx:68 |
629 | - __( 'End', 'event_espresso' ), |
|
629 | + __('End', 'event_espresso'), |
|
630 | 630 | |
631 | 631 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/tableView/useHeaderRowGenerator.tsx:84 |
632 | - __( 'Cap', 'event_espresso' ), |
|
632 | + __('Cap', 'event_espresso'), |
|
633 | 633 | |
634 | 634 | // Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/tableView/useHeaderRowGenerator.tsx:96 |
635 | 635 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/tableView/useHeaderRowGenerator.tsx:100 |
636 | - __( 'Sold', 'event_espresso' ), |
|
636 | + __('Sold', 'event_espresso'), |
|
637 | 637 | |
638 | 638 | // Reference: domains/core/admin/eventEditor/src/ui/registrationForm/ErrorMessage.tsx:33 |
639 | 639 | // Reference: packages/form-builder/src/constants.ts:67 |
640 | - __( 'Text Input', 'event_espresso' ), |
|
640 | + __('Text Input', 'event_espresso'), |
|
641 | 641 | |
642 | 642 | // Reference: domains/core/admin/eventEditor/src/ui/registrationForm/ErrorMessage.tsx:34 |
643 | 643 | // Reference: domains/core/admin/eventEditor/src/ui/registrationForm/constants.ts:32 |
644 | - __( 'Attendee First Name', 'event_espresso' ), |
|
644 | + __('Attendee First Name', 'event_espresso'), |
|
645 | 645 | |
646 | 646 | // Reference: domains/core/admin/eventEditor/src/ui/registrationForm/ErrorMessage.tsx:39 |
647 | 647 | /* translators: field name */ |
648 | - __( 'Registration form must have a field of type "%1$s" which maps to "%2$s"', 'event_espresso' ), |
|
648 | + __('Registration form must have a field of type "%1$s" which maps to "%2$s"', 'event_espresso'), |
|
649 | 649 | |
650 | 650 | // Reference: domains/core/admin/eventEditor/src/ui/registrationForm/ErrorMessage.tsx:40 |
651 | 651 | // Reference: packages/form-builder/src/constants.ts:82 |
652 | - __( 'Email Address', 'event_espresso' ), |
|
652 | + __('Email Address', 'event_espresso'), |
|
653 | 653 | |
654 | 654 | // Reference: domains/core/admin/eventEditor/src/ui/registrationForm/ErrorMessage.tsx:41 |
655 | 655 | // Reference: domains/core/admin/eventEditor/src/ui/registrationForm/constants.ts:40 |
656 | - __( 'Attendee Email Address', 'event_espresso' ), |
|
656 | + __('Attendee Email Address', 'event_espresso'), |
|
657 | 657 | |
658 | 658 | // Reference: domains/core/admin/eventEditor/src/ui/registrationForm/ErrorMessage.tsx:49 |
659 | - __( 'Please add the required fields', 'event_espresso' ), |
|
659 | + __('Please add the required fields', 'event_espresso'), |
|
660 | 660 | |
661 | 661 | // Reference: domains/core/admin/eventEditor/src/ui/registrationForm/RegistrationForm.tsx:12 |
662 | - __( 'Registration Form', 'event_espresso' ), |
|
662 | + __('Registration Form', 'event_espresso'), |
|
663 | 663 | |
664 | 664 | // Reference: domains/core/admin/eventEditor/src/ui/registrationForm/constants.ts:13 |
665 | - __( 'primary registrant', 'event_espresso' ), |
|
665 | + __('primary registrant', 'event_espresso'), |
|
666 | 666 | |
667 | 667 | // Reference: domains/core/admin/eventEditor/src/ui/registrationForm/constants.ts:17 |
668 | - __( 'purchaser', 'event_espresso' ), |
|
668 | + __('purchaser', 'event_espresso'), |
|
669 | 669 | |
670 | 670 | // Reference: domains/core/admin/eventEditor/src/ui/registrationForm/constants.ts:21 |
671 | - __( 'registrants', 'event_espresso' ), |
|
671 | + __('registrants', 'event_espresso'), |
|
672 | 672 | |
673 | 673 | // Reference: domains/core/admin/eventEditor/src/ui/registrationForm/constants.ts:36 |
674 | - __( 'Attendee Last Name', 'event_espresso' ), |
|
674 | + __('Attendee Last Name', 'event_espresso'), |
|
675 | 675 | |
676 | 676 | // Reference: domains/core/admin/eventEditor/src/ui/registrationForm/constants.ts:44 |
677 | - __( 'Attendee Address', 'event_espresso' ), |
|
677 | + __('Attendee Address', 'event_espresso'), |
|
678 | 678 | |
679 | 679 | // Reference: domains/core/admin/eventEditor/src/ui/registrationForm/constants.ts:9 |
680 | - __( 'all', 'event_espresso' ), |
|
680 | + __('all', 'event_espresso'), |
|
681 | 681 | |
682 | 682 | // Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/ErrorMessage.tsx:18 |
683 | - __( 'Tickets must always have at least one date assigned to them but one or more of the tickets below does not have any. |
|
684 | -Please correct the assignments for the highlighted cells.', 'event_espresso' ), |
|
683 | + __('Tickets must always have at least one date assigned to them but one or more of the tickets below does not have any. |
|
684 | +Please correct the assignments for the highlighted cells.', 'event_espresso'), |
|
685 | 685 | |
686 | 686 | // Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/ErrorMessage.tsx:22 |
687 | - __( 'Event Dates must always have at least one Ticket assigned to them but one or more of the Event Dates below does not have any. |
|
688 | -Please correct the assignments for the highlighted cells.', 'event_espresso' ), |
|
687 | + __('Event Dates must always have at least one Ticket assigned to them but one or more of the Event Dates below does not have any. |
|
688 | +Please correct the assignments for the highlighted cells.', 'event_espresso'), |
|
689 | 689 | |
690 | 690 | // Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/ErrorMessage.tsx:32 |
691 | - __( 'Please Update Assignments', 'event_espresso' ), |
|
691 | + __('Please Update Assignments', 'event_espresso'), |
|
692 | 692 | |
693 | 693 | // Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/ModalContainer.tsx:26 |
694 | - __( 'There seem to be some dates/tickets which have no tickets/dates assigned. Do you want to fix them now?', 'event_espresso' ), |
|
694 | + __('There seem to be some dates/tickets which have no tickets/dates assigned. Do you want to fix them now?', 'event_espresso'), |
|
695 | 695 | |
696 | 696 | // Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/ModalContainer.tsx:29 |
697 | - __( 'Alert!', 'event_espresso' ), |
|
697 | + __('Alert!', 'event_espresso'), |
|
698 | 698 | |
699 | 699 | // Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/ModalContainer.tsx:42 |
700 | 700 | /* translators: 1 entity id, 2 entity name */ |
701 | - __( 'Ticket Assignment Manager for Datetime: %1$s - %2$s', 'event_espresso' ), |
|
701 | + __('Ticket Assignment Manager for Datetime: %1$s - %2$s', 'event_espresso'), |
|
702 | 702 | |
703 | 703 | // Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/ModalContainer.tsx:49 |
704 | 704 | /* translators: 1 entity id, 2 entity name */ |
705 | - __( 'Ticket Assignment Manager for Ticket: %1$s - %2$s', 'event_espresso' ), |
|
705 | + __('Ticket Assignment Manager for Ticket: %1$s - %2$s', 'event_espresso'), |
|
706 | 706 | |
707 | 707 | // Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/TicketAssignmentsManagerModal.tsx:45 |
708 | 708 | // Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/table/Table.tsx:13 |
709 | - __( 'Ticket Assignment Manager', 'event_espresso' ), |
|
709 | + __('Ticket Assignment Manager', 'event_espresso'), |
|
710 | 710 | |
711 | 711 | // Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/config.ts:10 |
712 | - __( 'existing relation', 'event_espresso' ), |
|
712 | + __('existing relation', 'event_espresso'), |
|
713 | 713 | |
714 | 714 | // Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/config.ts:15 |
715 | - __( 'remove existing relation', 'event_espresso' ), |
|
715 | + __('remove existing relation', 'event_espresso'), |
|
716 | 716 | |
717 | 717 | // Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/config.ts:20 |
718 | - __( 'add new relation', 'event_espresso' ), |
|
718 | + __('add new relation', 'event_espresso'), |
|
719 | 719 | |
720 | 720 | // Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/config.ts:25 |
721 | - __( 'invalid relation', 'event_espresso' ), |
|
721 | + __('invalid relation', 'event_espresso'), |
|
722 | 722 | |
723 | 723 | // Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/config.ts:29 |
724 | - __( 'no relation', 'event_espresso' ), |
|
724 | + __('no relation', 'event_espresso'), |
|
725 | 725 | |
726 | 726 | // Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/table/useGetHeaderRows.tsx:15 |
727 | - __( 'Assignments', 'event_espresso' ), |
|
727 | + __('Assignments', 'event_espresso'), |
|
728 | 728 | |
729 | 729 | // Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/table/useGetHeaderRows.tsx:16 |
730 | - __( 'Event Dates are listed below', 'event_espresso' ), |
|
730 | + __('Event Dates are listed below', 'event_espresso'), |
|
731 | 731 | |
732 | 732 | // Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/table/useGetHeaderRows.tsx:17 |
733 | - __( 'Tickets are listed along the top', 'event_espresso' ), |
|
733 | + __('Tickets are listed along the top', 'event_espresso'), |
|
734 | 734 | |
735 | 735 | // Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/table/useGetHeaderRows.tsx:18 |
736 | - __( 'Click the cell buttons to toggle assigments', 'event_espresso' ), |
|
736 | + __('Click the cell buttons to toggle assigments', 'event_espresso'), |
|
737 | 737 | |
738 | 738 | // Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/useSubmitButtonProps.ts:29 |
739 | 739 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/prices/buttons/FooterButtons.tsx:16 |
@@ -742,1570 +742,1570 @@ discard block |
||
742 | 742 | // Reference: packages/tpc/src/buttons/useSubmitButtonProps.tsx:29 |
743 | 743 | // Reference: packages/ui-components/src/Modal/useSubmitButtonProps.tsx:13 |
744 | 744 | // Reference: packages/ui-components/src/Stepper/buttons/Submit.tsx:7 |
745 | - __( 'Submit', 'event_espresso' ), |
|
745 | + __('Submit', 'event_espresso'), |
|
746 | 746 | |
747 | 747 | // Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/filters/controls/DatesByMonthControl.tsx:20 |
748 | - __( 'All Dates', 'event_espresso' ), |
|
748 | + __('All Dates', 'event_espresso'), |
|
749 | 749 | |
750 | 750 | // Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/filters/controls/DatesByMonthControl.tsx:27 |
751 | - __( 'dates by month', 'event_espresso' ), |
|
751 | + __('dates by month', 'event_espresso'), |
|
752 | 752 | |
753 | 753 | // Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/filters/controls/ShowExpiredTicketsControl.tsx:16 |
754 | - __( 'show expired tickets', 'event_espresso' ), |
|
754 | + __('show expired tickets', 'event_espresso'), |
|
755 | 755 | |
756 | 756 | // Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/filters/controls/ShowTrashedDatesControl.tsx:13 |
757 | - __( 'show trashed dates', 'event_espresso' ), |
|
757 | + __('show trashed dates', 'event_espresso'), |
|
758 | 758 | |
759 | 759 | // Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/filters/controls/ShowTrashedTicketsControl.tsx:16 |
760 | - __( 'show trashed tickets', 'event_espresso' ), |
|
760 | + __('show trashed tickets', 'event_espresso'), |
|
761 | 761 | |
762 | 762 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/defaultTickets/Container.tsx:38 |
763 | 763 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/actions/Actions.tsx:25 |
764 | - __( 'Default tickets', 'event_espresso' ), |
|
764 | + __('Default tickets', 'event_espresso'), |
|
765 | 765 | |
766 | 766 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/defaultTickets/ModalBody.tsx:63 |
767 | 767 | // Reference: packages/edtr-services/src/constants.ts:26 |
768 | - __( 'ticket', 'event_espresso' ), |
|
768 | + __('ticket', 'event_espresso'), |
|
769 | 769 | |
770 | 770 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/defaultTickets/multiStep/FooterButtons.tsx:26 |
771 | 771 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/multiStep/FooterButtons.tsx:33 |
772 | - __( 'Set ticket prices', 'event_espresso' ), |
|
772 | + __('Set ticket prices', 'event_espresso'), |
|
773 | 773 | |
774 | 774 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/defaultTickets/multiStep/FooterButtons.tsx:31 |
775 | - __( 'Skip prices - Save', 'event_espresso' ), |
|
775 | + __('Skip prices - Save', 'event_espresso'), |
|
776 | 776 | |
777 | 777 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/defaultTickets/multiStep/FooterButtons.tsx:37 |
778 | 778 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/multiStep/FooterButtons.tsx:57 |
779 | - __( 'Ticket details', 'event_espresso' ), |
|
779 | + __('Ticket details', 'event_espresso'), |
|
780 | 780 | |
781 | 781 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/defaultTickets/multiStep/FooterButtons.tsx:38 |
782 | - __( 'Save', 'event_espresso' ), |
|
782 | + __('Save', 'event_espresso'), |
|
783 | 783 | |
784 | 784 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/defaultTickets/multiStep/Modal.tsx:22 |
785 | 785 | /* translators: %s ticket id */ |
786 | - __( 'Edit ticket %s', 'event_espresso' ), |
|
786 | + __('Edit ticket %s', 'event_espresso'), |
|
787 | 787 | |
788 | 788 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/defaultTickets/multiStep/Modal.tsx:25 |
789 | 789 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/multiStep/Modal.tsx:33 |
790 | - __( 'New Ticket Details', 'event_espresso' ), |
|
790 | + __('New Ticket Details', 'event_espresso'), |
|
791 | 791 | |
792 | 792 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/defaultTickets/multiStep/TicketFormSteps.tsx:10 |
793 | 793 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/multiStep/TicketFormSteps.tsx:10 |
794 | - __( 'primary information about the ticket', 'event_espresso' ), |
|
794 | + __('primary information about the ticket', 'event_espresso'), |
|
795 | 795 | |
796 | 796 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/defaultTickets/multiStep/TicketFormSteps.tsx:10 |
797 | 797 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/multiStep/TicketFormSteps.tsx:10 |
798 | - __( 'Ticket Details', 'event_espresso' ), |
|
798 | + __('Ticket Details', 'event_espresso'), |
|
799 | 799 | |
800 | 800 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/defaultTickets/multiStep/TicketFormSteps.tsx:12 |
801 | 801 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/multiStep/TicketFormSteps.tsx:12 |
802 | - __( 'apply ticket price modifiers and taxes', 'event_espresso' ), |
|
802 | + __('apply ticket price modifiers and taxes', 'event_espresso'), |
|
803 | 803 | |
804 | 804 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/defaultTickets/multiStep/TicketFormSteps.tsx:14 |
805 | 805 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/multiStep/TicketFormSteps.tsx:14 |
806 | - __( 'Price Calculator', 'event_espresso' ), |
|
806 | + __('Price Calculator', 'event_espresso'), |
|
807 | 807 | |
808 | 808 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/defaultTickets/multiStep/TicketFormSteps.tsx:16 |
809 | 809 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/multiStep/TicketFormSteps.tsx:16 |
810 | - __( 'Assign Dates', 'event_espresso' ), |
|
810 | + __('Assign Dates', 'event_espresso'), |
|
811 | 811 | |
812 | 812 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/multiStep/FooterButtons.tsx:39 |
813 | - __( 'Skip prices - assign dates', 'event_espresso' ), |
|
813 | + __('Skip prices - assign dates', 'event_espresso'), |
|
814 | 814 | |
815 | 815 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/multiStep/FooterButtons.tsx:50 |
816 | - __( 'Save and assign dates', 'event_espresso' ), |
|
816 | + __('Save and assign dates', 'event_espresso'), |
|
817 | 817 | |
818 | 818 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/multiStep/Modal.tsx:29 |
819 | 819 | /* translators: %1$s ticket name, %2$s ticket id */ |
820 | - __( 'Edit ticket "%1$s" - %2$s', 'event_espresso' ), |
|
820 | + __('Edit ticket "%1$s" - %2$s', 'event_espresso'), |
|
821 | 821 | |
822 | 822 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/multiStep/Modal.tsx:43 |
823 | - __( 'modal for ticket', 'event_espresso' ), |
|
823 | + __('modal for ticket', 'event_espresso'), |
|
824 | 824 | |
825 | 825 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:101 |
826 | - __( 'Set to 0 to stop sales, or leave blank for no limit.', 'event_espresso' ), |
|
826 | + __('Set to 0 to stop sales, or leave blank for no limit.', 'event_espresso'), |
|
827 | 827 | |
828 | 828 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:107 |
829 | 829 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/useBulkEditFormConfig.ts:119 |
830 | - __( 'Number of Uses', 'event_espresso' ), |
|
830 | + __('Number of Uses', 'event_espresso'), |
|
831 | 831 | |
832 | 832 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:113 |
833 | - __( 'Controls the total number of times this ticket can be used, regardless of the number of dates it is assigned to.', 'event_espresso' ), |
|
833 | + __('Controls the total number of times this ticket can be used, regardless of the number of dates it is assigned to.', 'event_espresso'), |
|
834 | 834 | |
835 | 835 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:117 |
836 | - __( 'Example: A ticket might have access to 4 different dates, but setting this field to 2 would mean that the ticket could only be used twice. Leave blank for no limit.', 'event_espresso' ), |
|
836 | + __('Example: A ticket might have access to 4 different dates, but setting this field to 2 would mean that the ticket could only be used twice. Leave blank for no limit.', 'event_espresso'), |
|
837 | 837 | |
838 | 838 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:125 |
839 | 839 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/useBulkEditFormConfig.ts:127 |
840 | - __( 'Minimum Quantity', 'event_espresso' ), |
|
840 | + __('Minimum Quantity', 'event_espresso'), |
|
841 | 841 | |
842 | 842 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:130 |
843 | - __( 'The minimum quantity that can be selected for this ticket. Use this to create ticket bundles or graduated pricing.', 'event_espresso' ), |
|
843 | + __('The minimum quantity that can be selected for this ticket. Use this to create ticket bundles or graduated pricing.', 'event_espresso'), |
|
844 | 844 | |
845 | 845 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:134 |
846 | - __( 'Leave blank for no minimum.', 'event_espresso' ), |
|
846 | + __('Leave blank for no minimum.', 'event_espresso'), |
|
847 | 847 | |
848 | 848 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:140 |
849 | 849 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/useBulkEditFormConfig.ts:135 |
850 | - __( 'Maximum Quantity', 'event_espresso' ), |
|
850 | + __('Maximum Quantity', 'event_espresso'), |
|
851 | 851 | |
852 | 852 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:146 |
853 | - __( 'The maximum quantity that can be selected for this ticket. Use this to create ticket bundles or graduated pricing.', 'event_espresso' ), |
|
853 | + __('The maximum quantity that can be selected for this ticket. Use this to create ticket bundles or graduated pricing.', 'event_espresso'), |
|
854 | 854 | |
855 | 855 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:150 |
856 | - __( 'Leave blank for no maximum.', 'event_espresso' ), |
|
856 | + __('Leave blank for no maximum.', 'event_espresso'), |
|
857 | 857 | |
858 | 858 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:156 |
859 | 859 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/useBulkEditFormConfig.ts:144 |
860 | - __( 'Required Ticket', 'event_espresso' ), |
|
860 | + __('Required Ticket', 'event_espresso'), |
|
861 | 861 | |
862 | 862 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:158 |
863 | - __( 'If enabled, the ticket must be selected and will appear first in ticket lists.', 'event_espresso' ), |
|
863 | + __('If enabled, the ticket must be selected and will appear first in ticket lists.', 'event_espresso'), |
|
864 | 864 | |
865 | 865 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:170 |
866 | - __( 'Visibility', 'event_espresso' ), |
|
866 | + __('Visibility', 'event_espresso'), |
|
867 | 867 | |
868 | 868 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:202 |
869 | - __( 'Ticket Sales', 'event_espresso' ), |
|
869 | + __('Ticket Sales', 'event_espresso'), |
|
870 | 870 | |
871 | 871 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:93 |
872 | 872 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/useBulkEditFormConfig.ts:110 |
873 | - __( 'Quantity For Sale', 'event_espresso' ), |
|
873 | + __('Quantity For Sale', 'event_espresso'), |
|
874 | 874 | |
875 | 875 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:99 |
876 | - __( 'The maximum number of this ticket available for sale.', 'event_espresso' ), |
|
876 | + __('The maximum number of this ticket available for sale.', 'event_espresso'), |
|
877 | 877 | |
878 | 878 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/TicketRegistrationsLink.tsx:14 |
879 | - __( 'view ALL registrations for this ticket.', 'event_espresso' ), |
|
879 | + __('view ALL registrations for this ticket.', 'event_espresso'), |
|
880 | 880 | |
881 | 881 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/TicketSoldLink.tsx:13 |
882 | - __( 'view approved registrations for this ticket.', 'event_espresso' ), |
|
882 | + __('view approved registrations for this ticket.', 'event_espresso'), |
|
883 | 883 | |
884 | 884 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/TicketsList.tsx:36 |
885 | - __( 'Available Tickets', 'event_espresso' ), |
|
885 | + __('Available Tickets', 'event_espresso'), |
|
886 | 886 | |
887 | 887 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/TicketsList.tsx:39 |
888 | - __( 'loading tickets…', 'event_espresso' ), |
|
888 | + __('loading tickets…', 'event_espresso'), |
|
889 | 889 | |
890 | 890 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/actionsMenu/AssignDatesButton.tsx:26 |
891 | - __( 'Number of related dates', 'event_espresso' ), |
|
891 | + __('Number of related dates', 'event_espresso'), |
|
892 | 892 | |
893 | 893 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/actionsMenu/AssignDatesButton.tsx:27 |
894 | - __( 'There are no event dates assigned to this ticket. Please click the calendar icon to update the assignments.', 'event_espresso' ), |
|
894 | + __('There are no event dates assigned to this ticket. Please click the calendar icon to update the assignments.', 'event_espresso'), |
|
895 | 895 | |
896 | 896 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/actionsMenu/AssignDatesButton.tsx:37 |
897 | - __( 'assign dates', 'event_espresso' ), |
|
897 | + __('assign dates', 'event_espresso'), |
|
898 | 898 | |
899 | 899 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/actionsMenu/dropdown/DeleteTicket.tsx:19 |
900 | - __( 'Permanently Delete Ticket?', 'event_espresso' ), |
|
900 | + __('Permanently Delete Ticket?', 'event_espresso'), |
|
901 | 901 | |
902 | 902 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/actionsMenu/dropdown/DeleteTicket.tsx:19 |
903 | - __( 'Move Ticket to Trash?', 'event_espresso' ), |
|
903 | + __('Move Ticket to Trash?', 'event_espresso'), |
|
904 | 904 | |
905 | 905 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/actionsMenu/dropdown/DeleteTicket.tsx:22 |
906 | - __( 'Are you sure you want to permanently delete this ticket? This action is permanent and can not be undone.', 'event_espresso' ), |
|
906 | + __('Are you sure you want to permanently delete this ticket? This action is permanent and can not be undone.', 'event_espresso'), |
|
907 | 907 | |
908 | 908 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/actionsMenu/dropdown/DeleteTicket.tsx:48 |
909 | 909 | // Reference: packages/ee-components/src/SimpleTicketCard/actions/Trash.tsx:6 |
910 | - __( 'trash ticket', 'event_espresso' ), |
|
910 | + __('trash ticket', 'event_espresso'), |
|
911 | 911 | |
912 | 912 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/actionsMenu/dropdown/TicketMainMenu.tsx:25 |
913 | - __( 'ticket main menu', 'event_espresso' ), |
|
913 | + __('ticket main menu', 'event_espresso'), |
|
914 | 914 | |
915 | 915 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/actionsMenu/dropdown/TicketMainMenu.tsx:38 |
916 | 916 | // Reference: packages/ee-components/src/SimpleTicketCard/actions/Edit.tsx:15 |
917 | - __( 'edit ticket', 'event_espresso' ), |
|
917 | + __('edit ticket', 'event_espresso'), |
|
918 | 918 | |
919 | 919 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/actionsMenu/dropdown/TicketMainMenu.tsx:39 |
920 | - __( 'copy ticket', 'event_espresso' ), |
|
920 | + __('copy ticket', 'event_espresso'), |
|
921 | 921 | |
922 | 922 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/actions/Actions.tsx:43 |
923 | - __( 'edit ticket details', 'event_espresso' ), |
|
923 | + __('edit ticket details', 'event_espresso'), |
|
924 | 924 | |
925 | 925 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/actions/Actions.tsx:47 |
926 | - __( 'delete tickets', 'event_espresso' ), |
|
926 | + __('delete tickets', 'event_espresso'), |
|
927 | 927 | |
928 | 928 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/actions/Actions.tsx:47 |
929 | - __( 'trash tickets', 'event_espresso' ), |
|
929 | + __('trash tickets', 'event_espresso'), |
|
930 | 930 | |
931 | 931 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/actions/Actions.tsx:51 |
932 | - __( 'edit ticket prices', 'event_espresso' ), |
|
932 | + __('edit ticket prices', 'event_espresso'), |
|
933 | 933 | |
934 | 934 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/delete/Delete.tsx:14 |
935 | - __( 'Are you sure you want to permanently delete these tickets? This action can NOT be undone!', 'event_espresso' ), |
|
935 | + __('Are you sure you want to permanently delete these tickets? This action can NOT be undone!', 'event_espresso'), |
|
936 | 936 | |
937 | 937 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/delete/Delete.tsx:15 |
938 | - __( 'Are you sure you want to trash these tickets?', 'event_espresso' ), |
|
938 | + __('Are you sure you want to trash these tickets?', 'event_espresso'), |
|
939 | 939 | |
940 | 940 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/delete/Delete.tsx:16 |
941 | - __( 'Delete tickets permanently', 'event_espresso' ), |
|
941 | + __('Delete tickets permanently', 'event_espresso'), |
|
942 | 942 | |
943 | 943 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/delete/Delete.tsx:16 |
944 | - __( 'Trash tickets', 'event_espresso' ), |
|
944 | + __('Trash tickets', 'event_espresso'), |
|
945 | 945 | |
946 | 946 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/EditDetails.tsx:21 |
947 | - __( 'Bulk edit ticket details', 'event_espresso' ), |
|
947 | + __('Bulk edit ticket details', 'event_espresso'), |
|
948 | 948 | |
949 | 949 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/EditDetails.tsx:22 |
950 | - __( 'any changes will be applied to ALL of the selected tickets.', 'event_espresso' ), |
|
950 | + __('any changes will be applied to ALL of the selected tickets.', 'event_espresso'), |
|
951 | 951 | |
952 | 952 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/prices/EditPrices.tsx:19 |
953 | - __( 'Bulk edit ticket prices', 'event_espresso' ), |
|
953 | + __('Bulk edit ticket prices', 'event_espresso'), |
|
954 | 954 | |
955 | 955 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/prices/buttons/EditModeButtons.tsx:20 |
956 | - __( 'Edit all prices together', 'event_espresso' ), |
|
956 | + __('Edit all prices together', 'event_espresso'), |
|
957 | 957 | |
958 | 958 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/prices/buttons/EditModeButtons.tsx:21 |
959 | - __( 'Edit all the selected ticket prices dynamically', 'event_espresso' ), |
|
959 | + __('Edit all the selected ticket prices dynamically', 'event_espresso'), |
|
960 | 960 | |
961 | 961 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/prices/buttons/EditModeButtons.tsx:25 |
962 | - __( 'Edit prices individually', 'event_espresso' ), |
|
962 | + __('Edit prices individually', 'event_espresso'), |
|
963 | 963 | |
964 | 964 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/prices/buttons/EditModeButtons.tsx:26 |
965 | - __( 'Edit prices for each ticket individually', 'event_espresso' ), |
|
965 | + __('Edit prices for each ticket individually', 'event_espresso'), |
|
966 | 966 | |
967 | 967 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/prices/buttons/FooterButtons.tsx:14 |
968 | 968 | // Reference: packages/ee-components/src/bulkEdit/details/Submit.tsx:34 |
969 | 969 | // Reference: packages/form/src/ResetButton.tsx:18 |
970 | 970 | // Reference: packages/tpc/src/buttons/useResetButtonProps.tsx:12 |
971 | - __( 'Reset', 'event_espresso' ), |
|
971 | + __('Reset', 'event_espresso'), |
|
972 | 972 | |
973 | 973 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/prices/buttons/FooterButtons.tsx:15 |
974 | 974 | // Reference: packages/tpc/src/hooks/useLockedTicketAction.ts:76 |
975 | 975 | // Reference: packages/ui-components/src/Modal/useCancelButtonProps.tsx:10 |
976 | - __( 'Cancel', 'event_espresso' ), |
|
976 | + __('Cancel', 'event_espresso'), |
|
977 | 977 | |
978 | 978 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/prices/editSeparately/TPCInstance.tsx:26 |
979 | 979 | /* translators: %s ticket name */ |
980 | - __( 'Edit prices for Ticket: %s', 'event_espresso' ), |
|
980 | + __('Edit prices for Ticket: %s', 'event_espresso'), |
|
981 | 981 | |
982 | 982 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/cardView/TicketCardSidebar.tsx:30 |
983 | - __( 'sales start', 'event_espresso' ), |
|
983 | + __('sales start', 'event_espresso'), |
|
984 | 984 | |
985 | 985 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/cardView/TicketCardSidebar.tsx:33 |
986 | - __( 'sales began', 'event_espresso' ), |
|
986 | + __('sales began', 'event_espresso'), |
|
987 | 987 | |
988 | 988 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/cardView/TicketCardSidebar.tsx:35 |
989 | - __( 'sales ended', 'event_espresso' ), |
|
989 | + __('sales ended', 'event_espresso'), |
|
990 | 990 | |
991 | 991 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/cardView/TicketCardSidebar.tsx:36 |
992 | - __( 'sales end', 'event_espresso' ), |
|
992 | + __('sales end', 'event_espresso'), |
|
993 | 993 | |
994 | 994 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/cardView/TicketCardSidebar.tsx:50 |
995 | - __( 'Edit Ticket Sale Dates', 'event_espresso' ), |
|
995 | + __('Edit Ticket Sale Dates', 'event_espresso'), |
|
996 | 996 | |
997 | 997 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/cardView/TicketCardSidebar.tsx:54 |
998 | - __( 'edit ticket sales start and end dates', 'event_espresso' ), |
|
998 | + __('edit ticket sales start and end dates', 'event_espresso'), |
|
999 | 999 | |
1000 | 1000 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/cardView/TicketDetailsPanel.tsx:21 |
1001 | - __( 'quantity', 'event_espresso' ), |
|
1001 | + __('quantity', 'event_espresso'), |
|
1002 | 1002 | |
1003 | 1003 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/cardView/TicketQuantity.tsx:28 |
1004 | 1004 | // Reference: packages/edtr-services/src/apollo/mutations/tickets/useUpdateTicketQtyByCapacity.ts:78 |
1005 | - __( 'Ticket quantity has been adjusted because it cannot be more than the related event date capacity.', 'event_espresso' ), |
|
1005 | + __('Ticket quantity has been adjusted because it cannot be more than the related event date capacity.', 'event_espresso'), |
|
1006 | 1006 | |
1007 | 1007 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/cardView/TicketQuantity.tsx:51 |
1008 | - __( 'edit quantity of tickets available…', 'event_espresso' ), |
|
1008 | + __('edit quantity of tickets available…', 'event_espresso'), |
|
1009 | 1009 | |
1010 | 1010 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/config.ts:14 |
1011 | - __( 'Manage Date Assignments', 'event_espresso' ), |
|
1011 | + __('Manage Date Assignments', 'event_espresso'), |
|
1012 | 1012 | |
1013 | 1013 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/config.ts:19 |
1014 | 1014 | // Reference: packages/tpc/src/components/table/Table.tsx:43 |
1015 | - __( 'Ticket Price Calculator', 'event_espresso' ), |
|
1015 | + __('Ticket Price Calculator', 'event_espresso'), |
|
1016 | 1016 | |
1017 | 1017 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/config.ts:24 |
1018 | - __( 'Move Ticket to Trash', 'event_espresso' ), |
|
1018 | + __('Move Ticket to Trash', 'event_espresso'), |
|
1019 | 1019 | |
1020 | 1020 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/config.ts:31 |
1021 | 1021 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/tableView/useHeaderRowGenerator.tsx:54 |
1022 | - __( 'On Sale', 'event_espresso' ), |
|
1022 | + __('On Sale', 'event_espresso'), |
|
1023 | 1023 | |
1024 | 1024 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/config.ts:33 |
1025 | - __( 'Pending', 'event_espresso' ), |
|
1025 | + __('Pending', 'event_espresso'), |
|
1026 | 1026 | |
1027 | 1027 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/config.ts:9 |
1028 | - __( 'Edit Ticket Details', 'event_espresso' ), |
|
1028 | + __('Edit Ticket Details', 'event_espresso'), |
|
1029 | 1029 | |
1030 | 1030 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/editable/EditablePrice.tsx:39 |
1031 | - __( 'edit ticket total…', 'event_espresso' ), |
|
1031 | + __('edit ticket total…', 'event_espresso'), |
|
1032 | 1032 | |
1033 | 1033 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/editable/EditablePrice.tsx:53 |
1034 | - __( 'set price…', 'event_espresso' ), |
|
1034 | + __('set price…', 'event_espresso'), |
|
1035 | 1035 | |
1036 | 1036 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/IsChainedButton.tsx:23 |
1037 | - __( 'tickets list is linked to dates list and is showing tickets for above dates only', 'event_espresso' ), |
|
1037 | + __('tickets list is linked to dates list and is showing tickets for above dates only', 'event_espresso'), |
|
1038 | 1038 | |
1039 | 1039 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/IsChainedButton.tsx:24 |
1040 | - __( 'tickets list is unlinked and is showing tickets for all event dates', 'event_espresso' ), |
|
1040 | + __('tickets list is unlinked and is showing tickets for all event dates', 'event_espresso'), |
|
1041 | 1041 | |
1042 | 1042 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:10 |
1043 | - __( 'ticket sales start and end dates', 'event_espresso' ), |
|
1043 | + __('ticket sales start and end dates', 'event_espresso'), |
|
1044 | 1044 | |
1045 | 1045 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:15 |
1046 | - __( 'tickets with 90% or more sold', 'event_espresso' ), |
|
1046 | + __('tickets with 90% or more sold', 'event_espresso'), |
|
1047 | 1047 | |
1048 | 1048 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:16 |
1049 | - __( 'tickets with 75% or more sold', 'event_espresso' ), |
|
1049 | + __('tickets with 75% or more sold', 'event_espresso'), |
|
1050 | 1050 | |
1051 | 1051 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:17 |
1052 | - __( 'tickets with 50% or more sold', 'event_espresso' ), |
|
1052 | + __('tickets with 50% or more sold', 'event_espresso'), |
|
1053 | 1053 | |
1054 | 1054 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:19 |
1055 | - __( 'tickets with less than 50% sold', 'event_espresso' ), |
|
1055 | + __('tickets with less than 50% sold', 'event_espresso'), |
|
1056 | 1056 | |
1057 | 1057 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:28 |
1058 | - __( 'all tickets for all dates', 'event_espresso' ), |
|
1058 | + __('all tickets for all dates', 'event_espresso'), |
|
1059 | 1059 | |
1060 | 1060 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:29 |
1061 | - __( 'all on sale and sale pending', 'event_espresso' ), |
|
1061 | + __('all on sale and sale pending', 'event_espresso'), |
|
1062 | 1062 | |
1063 | 1063 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:30 |
1064 | - __( 'on sale tickets only', 'event_espresso' ), |
|
1064 | + __('on sale tickets only', 'event_espresso'), |
|
1065 | 1065 | |
1066 | 1066 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:31 |
1067 | - __( 'sale pending tickets only', 'event_espresso' ), |
|
1067 | + __('sale pending tickets only', 'event_espresso'), |
|
1068 | 1068 | |
1069 | 1069 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:32 |
1070 | - __( 'next on sale or sale pending only', 'event_espresso' ), |
|
1070 | + __('next on sale or sale pending only', 'event_espresso'), |
|
1071 | 1071 | |
1072 | 1072 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:33 |
1073 | - __( 'sold out tickets only', 'event_espresso' ), |
|
1073 | + __('sold out tickets only', 'event_espresso'), |
|
1074 | 1074 | |
1075 | 1075 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:34 |
1076 | - __( 'expired tickets only', 'event_espresso' ), |
|
1076 | + __('expired tickets only', 'event_espresso'), |
|
1077 | 1077 | |
1078 | 1078 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:35 |
1079 | - __( 'trashed tickets only', 'event_espresso' ), |
|
1079 | + __('trashed tickets only', 'event_espresso'), |
|
1080 | 1080 | |
1081 | 1081 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:40 |
1082 | - __( 'all tickets for above dates', 'event_espresso' ), |
|
1082 | + __('all tickets for above dates', 'event_espresso'), |
|
1083 | 1083 | |
1084 | 1084 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:44 |
1085 | - __( 'ticket sale date', 'event_espresso' ), |
|
1085 | + __('ticket sale date', 'event_espresso'), |
|
1086 | 1086 | |
1087 | 1087 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:45 |
1088 | - __( 'ticket name', 'event_espresso' ), |
|
1088 | + __('ticket name', 'event_espresso'), |
|
1089 | 1089 | |
1090 | 1090 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:46 |
1091 | - __( 'ticket ID', 'event_espresso' ), |
|
1091 | + __('ticket ID', 'event_espresso'), |
|
1092 | 1092 | |
1093 | 1093 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:52 |
1094 | - __( 'linked', 'event_espresso' ), |
|
1094 | + __('linked', 'event_espresso'), |
|
1095 | 1095 | |
1096 | 1096 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:8 |
1097 | - __( 'ticket sales start date only', 'event_espresso' ), |
|
1097 | + __('ticket sales start date only', 'event_espresso'), |
|
1098 | 1098 | |
1099 | 1099 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:9 |
1100 | - __( 'ticket sales end date only', 'event_espresso' ), |
|
1100 | + __('ticket sales end date only', 'event_espresso'), |
|
1101 | 1101 | |
1102 | 1102 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/newTicketOptions/AddSingleTicket.tsx:18 |
1103 | - __( 'Add New Ticket', 'event_espresso' ), |
|
1103 | + __('Add New Ticket', 'event_espresso'), |
|
1104 | 1104 | |
1105 | 1105 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/newTicketOptions/AddSingleTicket.tsx:32 |
1106 | - __( 'Add a single ticket and assign the dates to it', 'event_espresso' ), |
|
1106 | + __('Add a single ticket and assign the dates to it', 'event_espresso'), |
|
1107 | 1107 | |
1108 | 1108 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/newTicketOptions/AddSingleTicket.tsx:34 |
1109 | - __( 'Single Ticket', 'event_espresso' ), |
|
1109 | + __('Single Ticket', 'event_espresso'), |
|
1110 | 1110 | |
1111 | 1111 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/tableView/TableView.tsx:39 |
1112 | - __( 'Tickets', 'event_espresso' ), |
|
1112 | + __('Tickets', 'event_espresso'), |
|
1113 | 1113 | |
1114 | 1114 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/tableView/useHeaderRowGenerator.tsx:110 |
1115 | - __( 'Reg List', 'event_espresso' ), |
|
1115 | + __('Reg List', 'event_espresso'), |
|
1116 | 1116 | |
1117 | 1117 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/tableView/useHeaderRowGenerator.tsx:53 |
1118 | - __( 'Goes on Sale', 'event_espresso' ), |
|
1118 | + __('Goes on Sale', 'event_espresso'), |
|
1119 | 1119 | |
1120 | 1120 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/tableView/useHeaderRowGenerator.tsx:67 |
1121 | - __( 'Sale Ends', 'event_espresso' ), |
|
1121 | + __('Sale Ends', 'event_espresso'), |
|
1122 | 1122 | |
1123 | 1123 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/tableView/useHeaderRowGenerator.tsx:68 |
1124 | - __( 'Ends', 'event_espresso' ), |
|
1124 | + __('Ends', 'event_espresso'), |
|
1125 | 1125 | |
1126 | 1126 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/tableView/useHeaderRowGenerator.tsx:80 |
1127 | - __( 'Price', 'event_espresso' ), |
|
1127 | + __('Price', 'event_espresso'), |
|
1128 | 1128 | |
1129 | 1129 | // Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/tableView/useHeaderRowGenerator.tsx:90 |
1130 | - __( 'Qty', 'event_espresso' ), |
|
1130 | + __('Qty', 'event_espresso'), |
|
1131 | 1131 | |
1132 | 1132 | // Reference: domains/core/admin/eventEditor/src/ui/venue/VenueDetails.tsx:104 |
1133 | - __( 'Venue telephone', 'event_espresso' ), |
|
1133 | + __('Venue telephone', 'event_espresso'), |
|
1134 | 1134 | |
1135 | 1135 | // Reference: domains/core/admin/eventEditor/src/ui/venue/VenueDetails.tsx:111 |
1136 | - __( 'Edit this Venue', 'event_espresso' ), |
|
1136 | + __('Edit this Venue', 'event_espresso'), |
|
1137 | 1137 | |
1138 | 1138 | // Reference: domains/core/admin/eventEditor/src/ui/venue/VenueDetails.tsx:120 |
1139 | - __( 'Select a Venue for the Event', 'event_espresso' ), |
|
1139 | + __('Select a Venue for the Event', 'event_espresso'), |
|
1140 | 1140 | |
1141 | 1141 | // Reference: domains/core/admin/eventEditor/src/ui/venue/VenueDetails.tsx:21 |
1142 | - __( 'Venue Details', 'event_espresso' ), |
|
1142 | + __('Venue Details', 'event_espresso'), |
|
1143 | 1143 | |
1144 | 1144 | // Reference: domains/core/admin/eventEditor/src/ui/venue/VenueDetails.tsx:39 |
1145 | - __( 'unlimited space', 'event_espresso' ), |
|
1145 | + __('unlimited space', 'event_espresso'), |
|
1146 | 1146 | |
1147 | 1147 | // Reference: domains/core/admin/eventEditor/src/ui/venue/VenueDetails.tsx:42 |
1148 | 1148 | /* translators: %d venue capacity */ |
1149 | - __( 'Space for up to %d people', 'event_espresso' ), |
|
1149 | + __('Space for up to %d people', 'event_espresso'), |
|
1150 | 1150 | |
1151 | 1151 | // Reference: domains/core/admin/eventEditor/src/ui/venue/VenueDetails.tsx:53 |
1152 | - __( 'Venue address', 'event_espresso' ), |
|
1152 | + __('Venue address', 'event_espresso'), |
|
1153 | 1153 | |
1154 | 1154 | // Reference: domains/core/admin/eventEditor/src/ui/venue/VenueDetails.tsx:59 |
1155 | - __( 'Venue Details card', 'event_espresso' ), |
|
1155 | + __('Venue Details card', 'event_espresso'), |
|
1156 | 1156 | |
1157 | 1157 | // Reference: domains/core/admin/eventEditor/src/ui/venue/VenueDetails.tsx:68 |
1158 | - __( 'no image', 'event_espresso' ), |
|
1158 | + __('no image', 'event_espresso'), |
|
1159 | 1159 | |
1160 | 1160 | // Reference: domains/core/admin/eventEditor/src/ui/venue/VenueDetails.tsx:72 |
1161 | - __( 'Venue name', 'event_espresso' ), |
|
1161 | + __('Venue name', 'event_espresso'), |
|
1162 | 1162 | |
1163 | 1163 | // Reference: domains/core/admin/eventEditor/src/ui/venue/VenueDetails.tsx:96 |
1164 | - __( 'Venue capacity', 'event_espresso' ), |
|
1164 | + __('Venue capacity', 'event_espresso'), |
|
1165 | 1165 | |
1166 | 1166 | // Reference: domains/core/admin/wpPluginsPage/src/exitSurvey/Popup.tsx:29 |
1167 | - __( 'Do you have a moment to share why you are deactivating Event Espresso?', 'event_espresso' ), |
|
1167 | + __('Do you have a moment to share why you are deactivating Event Espresso?', 'event_espresso'), |
|
1168 | 1168 | |
1169 | 1169 | // Reference: domains/core/admin/wpPluginsPage/src/exitSurvey/Popup.tsx:40 |
1170 | - __( 'Skip', 'event_espresso' ), |
|
1170 | + __('Skip', 'event_espresso'), |
|
1171 | 1171 | |
1172 | 1172 | // Reference: domains/core/admin/wpPluginsPage/src/exitSurvey/Popup.tsx:42 |
1173 | - __( 'Sure I\'ll help', 'event_espresso' ), |
|
1173 | + __('Sure I\'ll help', 'event_espresso'), |
|
1174 | 1174 | |
1175 | 1175 | // Reference: packages/adapters/src/Pagination/Pagination.tsx:23 |
1176 | - __( 'pagination', 'event_espresso' ), |
|
1176 | + __('pagination', 'event_espresso'), |
|
1177 | 1177 | |
1178 | 1178 | // Reference: packages/adapters/src/TagSelector/TagSelector.tsx:113 |
1179 | - __( 'toggle menu', 'event_espresso' ), |
|
1179 | + __('toggle menu', 'event_espresso'), |
|
1180 | 1180 | |
1181 | 1181 | // Reference: packages/constants/src/datetime.ts:10 |
1182 | - __( 'Postponed', 'event_espresso' ), |
|
1182 | + __('Postponed', 'event_espresso'), |
|
1183 | 1183 | |
1184 | 1184 | // Reference: packages/constants/src/datetime.ts:11 |
1185 | - __( 'SoldOut', 'event_espresso' ), |
|
1185 | + __('SoldOut', 'event_espresso'), |
|
1186 | 1186 | |
1187 | 1187 | // Reference: packages/constants/src/datetime.ts:7 |
1188 | 1188 | // Reference: packages/predicates/src/registration/statusOptions.ts:11 |
1189 | - __( 'Cancelled', 'event_espresso' ), |
|
1189 | + __('Cancelled', 'event_espresso'), |
|
1190 | 1190 | |
1191 | 1191 | // Reference: packages/constants/src/datetime.ts:9 |
1192 | - __( 'Inactive', 'event_espresso' ), |
|
1192 | + __('Inactive', 'event_espresso'), |
|
1193 | 1193 | |
1194 | 1194 | // Reference: packages/data/src/mutations/useMutationWithFeedback.ts:25 |
1195 | - __( 'error creating %s', 'event_espresso' ), |
|
1195 | + __('error creating %s', 'event_espresso'), |
|
1196 | 1196 | |
1197 | 1197 | // Reference: packages/data/src/mutations/useMutationWithFeedback.ts:26 |
1198 | - __( 'error deleting %s', 'event_espresso' ), |
|
1198 | + __('error deleting %s', 'event_espresso'), |
|
1199 | 1199 | |
1200 | 1200 | // Reference: packages/data/src/mutations/useMutationWithFeedback.ts:27 |
1201 | - __( 'error updating %s', 'event_espresso' ), |
|
1201 | + __('error updating %s', 'event_espresso'), |
|
1202 | 1202 | |
1203 | 1203 | // Reference: packages/data/src/mutations/useMutationWithFeedback.ts:28 |
1204 | - __( 'creating %s', 'event_espresso' ), |
|
1204 | + __('creating %s', 'event_espresso'), |
|
1205 | 1205 | |
1206 | 1206 | // Reference: packages/data/src/mutations/useMutationWithFeedback.ts:29 |
1207 | - __( 'deleting %s', 'event_espresso' ), |
|
1207 | + __('deleting %s', 'event_espresso'), |
|
1208 | 1208 | |
1209 | 1209 | // Reference: packages/data/src/mutations/useMutationWithFeedback.ts:30 |
1210 | - __( 'updating %s', 'event_espresso' ), |
|
1210 | + __('updating %s', 'event_espresso'), |
|
1211 | 1211 | |
1212 | 1212 | // Reference: packages/data/src/mutations/useMutationWithFeedback.ts:31 |
1213 | - __( 'successfully created %s', 'event_espresso' ), |
|
1213 | + __('successfully created %s', 'event_espresso'), |
|
1214 | 1214 | |
1215 | 1215 | // Reference: packages/data/src/mutations/useMutationWithFeedback.ts:32 |
1216 | - __( 'successfully deleted %s', 'event_espresso' ), |
|
1216 | + __('successfully deleted %s', 'event_espresso'), |
|
1217 | 1217 | |
1218 | 1218 | // Reference: packages/data/src/mutations/useMutationWithFeedback.ts:33 |
1219 | - __( 'successfully updated %s', 'event_espresso' ), |
|
1219 | + __('successfully updated %s', 'event_espresso'), |
|
1220 | 1220 | |
1221 | 1221 | // Reference: packages/dates/src/components/DateRangePicker/DateRangePickerLegend.tsx:13 |
1222 | - __( 'day in range', 'event_espresso' ), |
|
1222 | + __('day in range', 'event_espresso'), |
|
1223 | 1223 | |
1224 | 1224 | // Reference: packages/dates/src/components/DateRangePicker/DateRangePickerLegend.tsx:17 |
1225 | 1225 | // Reference: packages/dates/src/components/DateRangePicker/index.tsx:79 |
1226 | - __( 'end date', 'event_espresso' ), |
|
1226 | + __('end date', 'event_espresso'), |
|
1227 | 1227 | |
1228 | 1228 | // Reference: packages/dates/src/components/DateTimePicker.tsx:17 |
1229 | 1229 | // Reference: packages/dates/src/components/TimePicker.tsx:17 |
1230 | 1230 | // Reference: packages/form-builder/src/state/utils.ts:433 |
1231 | - __( 'time', 'event_espresso' ), |
|
1231 | + __('time', 'event_espresso'), |
|
1232 | 1232 | |
1233 | 1233 | // Reference: packages/dates/src/constants.ts:7 |
1234 | - __( 'End Date & Time must be set later than the Start Date & Time', 'event_espresso' ), |
|
1234 | + __('End Date & Time must be set later than the Start Date & Time', 'event_espresso'), |
|
1235 | 1235 | |
1236 | 1236 | // Reference: packages/dates/src/constants.ts:9 |
1237 | - __( 'Start Date & Time must be set before the End Date & Time', 'event_espresso' ), |
|
1237 | + __('Start Date & Time must be set before the End Date & Time', 'event_espresso'), |
|
1238 | 1238 | |
1239 | 1239 | // Reference: packages/dates/src/utils/misc.ts:16 |
1240 | - __( 'month(s)', 'event_espresso' ), |
|
1240 | + __('month(s)', 'event_espresso'), |
|
1241 | 1241 | |
1242 | 1242 | // Reference: packages/dates/src/utils/misc.ts:17 |
1243 | - __( 'week(s)', 'event_espresso' ), |
|
1243 | + __('week(s)', 'event_espresso'), |
|
1244 | 1244 | |
1245 | 1245 | // Reference: packages/dates/src/utils/misc.ts:18 |
1246 | - __( 'day(s)', 'event_espresso' ), |
|
1246 | + __('day(s)', 'event_espresso'), |
|
1247 | 1247 | |
1248 | 1248 | // Reference: packages/dates/src/utils/misc.ts:19 |
1249 | - __( 'hour(s)', 'event_espresso' ), |
|
1249 | + __('hour(s)', 'event_espresso'), |
|
1250 | 1250 | |
1251 | 1251 | // Reference: packages/dates/src/utils/misc.ts:20 |
1252 | - __( 'minute(s)', 'event_espresso' ), |
|
1252 | + __('minute(s)', 'event_espresso'), |
|
1253 | 1253 | |
1254 | 1254 | // Reference: packages/edtr-services/src/apollo/mutations/useReorderEntities.ts:63 |
1255 | - __( 'order updated', 'event_espresso' ), |
|
1255 | + __('order updated', 'event_espresso'), |
|
1256 | 1256 | |
1257 | 1257 | // Reference: packages/edtr-services/src/constants.ts:24 |
1258 | - __( 'datetime', 'event_espresso' ), |
|
1258 | + __('datetime', 'event_espresso'), |
|
1259 | 1259 | |
1260 | 1260 | // Reference: packages/edtr-services/src/constants.ts:27 |
1261 | - __( 'price', 'event_espresso' ), |
|
1261 | + __('price', 'event_espresso'), |
|
1262 | 1262 | |
1263 | 1263 | // Reference: packages/edtr-services/src/constants.ts:28 |
1264 | 1264 | // Reference: packages/tpc/src/components/price/input/Type.tsx:30 |
1265 | - __( 'price type', 'event_espresso' ), |
|
1265 | + __('price type', 'event_espresso'), |
|
1266 | 1266 | |
1267 | 1267 | // Reference: packages/edtr-services/src/utils/dateAndTime.ts:38 |
1268 | 1268 | // Reference: packages/ui-components/src/EditDateRangeButton/EditDateRangeButton.tsx:39 |
1269 | - __( 'End date has been adjusted', 'event_espresso' ), |
|
1269 | + __('End date has been adjusted', 'event_espresso'), |
|
1270 | 1270 | |
1271 | 1271 | // Reference: packages/edtr-services/src/utils/dateAndTime.ts:59 |
1272 | - __( 'Required', 'event_espresso' ), |
|
1272 | + __('Required', 'event_espresso'), |
|
1273 | 1273 | |
1274 | 1274 | // Reference: packages/edtr-services/src/utils/dateAndTime.ts:64 |
1275 | - __( 'Start Date is required', 'event_espresso' ), |
|
1275 | + __('Start Date is required', 'event_espresso'), |
|
1276 | 1276 | |
1277 | 1277 | // Reference: packages/edtr-services/src/utils/dateAndTime.ts:68 |
1278 | - __( 'End Date is required', 'event_espresso' ), |
|
1278 | + __('End Date is required', 'event_espresso'), |
|
1279 | 1279 | |
1280 | 1280 | // Reference: packages/ee-components/src/EntityList/EntityList.tsx:30 |
1281 | - __( 'no results found', 'event_espresso' ), |
|
1281 | + __('no results found', 'event_espresso'), |
|
1282 | 1282 | |
1283 | 1283 | // Reference: packages/ee-components/src/EntityList/EntityList.tsx:31 |
1284 | - __( 'try changing filter settings', 'event_espresso' ), |
|
1284 | + __('try changing filter settings', 'event_espresso'), |
|
1285 | 1285 | |
1286 | 1286 | // Reference: packages/ee-components/src/bulkEdit/ActionCheckbox.tsx:38 |
1287 | 1287 | /* translators: %d entity id */ |
1288 | - __( 'select entity with id %d', 'event_espresso' ), |
|
1288 | + __('select entity with id %d', 'event_espresso'), |
|
1289 | 1289 | |
1290 | 1290 | // Reference: packages/ee-components/src/bulkEdit/ActionCheckbox.tsx:41 |
1291 | - __( 'select all entities', 'event_espresso' ), |
|
1291 | + __('select all entities', 'event_espresso'), |
|
1292 | 1292 | |
1293 | 1293 | // Reference: packages/ee-components/src/bulkEdit/details/BulkEditDetails.tsx:20 |
1294 | - __( 'Note: ', 'event_espresso' ), |
|
1294 | + __('Note: ', 'event_espresso'), |
|
1295 | 1295 | |
1296 | 1296 | // Reference: packages/ee-components/src/bulkEdit/details/BulkEditDetails.tsx:20 |
1297 | - __( 'any changes will be applied to ALL of the selected entities.', 'event_espresso' ), |
|
1297 | + __('any changes will be applied to ALL of the selected entities.', 'event_espresso'), |
|
1298 | 1298 | |
1299 | 1299 | // Reference: packages/ee-components/src/bulkEdit/details/BulkEditDetails.tsx:27 |
1300 | - __( 'Bulk edit details', 'event_espresso' ), |
|
1300 | + __('Bulk edit details', 'event_espresso'), |
|
1301 | 1301 | |
1302 | 1302 | // Reference: packages/ee-components/src/bulkEdit/details/Submit.tsx:17 |
1303 | - __( 'Are you sure you want to bulk update the details?', 'event_espresso' ), |
|
1303 | + __('Are you sure you want to bulk update the details?', 'event_espresso'), |
|
1304 | 1304 | |
1305 | 1305 | // Reference: packages/ee-components/src/bulkEdit/details/Submit.tsx:18 |
1306 | - __( 'Bulk update details', 'event_espresso' ), |
|
1306 | + __('Bulk update details', 'event_espresso'), |
|
1307 | 1307 | |
1308 | 1308 | // Reference: packages/ee-components/src/filterBar/SortByControl/index.tsx:26 |
1309 | - __( 'set order', 'event_espresso' ), |
|
1309 | + __('set order', 'event_espresso'), |
|
1310 | 1310 | |
1311 | 1311 | // Reference: packages/ee-components/src/filterBar/SortByControl/index.tsx:28 |
1312 | - __( 'Set Custom Dates Order - this is how dates are ordered on the frontend', 'event_espresso' ), |
|
1312 | + __('Set Custom Dates Order - this is how dates are ordered on the frontend', 'event_espresso'), |
|
1313 | 1313 | |
1314 | 1314 | // Reference: packages/ee-components/src/filterBar/SortByControl/index.tsx:29 |
1315 | - __( 'Set Custom Tickets Order - this is how tickets are ordered on the frontend', 'event_espresso' ), |
|
1315 | + __('Set Custom Tickets Order - this is how tickets are ordered on the frontend', 'event_espresso'), |
|
1316 | 1316 | |
1317 | 1317 | // Reference: packages/form-builder/src/FormElement/FormElementToolbar.tsx:32 |
1318 | - __( 'delete form element', 'event_espresso' ), |
|
1318 | + __('delete form element', 'event_espresso'), |
|
1319 | 1319 | |
1320 | 1320 | // Reference: packages/form-builder/src/FormElement/FormElementToolbar.tsx:49 |
1321 | - __( 'form element settings', 'event_espresso' ), |
|
1321 | + __('form element settings', 'event_espresso'), |
|
1322 | 1322 | |
1323 | 1323 | // Reference: packages/form-builder/src/FormElement/FormElementToolbar.tsx:59 |
1324 | - __( 'copy form element', 'event_espresso' ), |
|
1324 | + __('copy form element', 'event_espresso'), |
|
1325 | 1325 | |
1326 | 1326 | // Reference: packages/form-builder/src/FormElement/FormElementToolbar.tsx:69 |
1327 | - __( 'click, hold, and drag to reorder form element', 'event_espresso' ), |
|
1327 | + __('click, hold, and drag to reorder form element', 'event_espresso'), |
|
1328 | 1328 | |
1329 | 1329 | // Reference: packages/form-builder/src/FormElement/Tabs/FieldOption.tsx:20 |
1330 | - __( 'remove option', 'event_espresso' ), |
|
1330 | + __('remove option', 'event_espresso'), |
|
1331 | 1331 | |
1332 | 1332 | // Reference: packages/form-builder/src/FormElement/Tabs/FieldOption.tsx:42 |
1333 | - __( 'value', 'event_espresso' ), |
|
1333 | + __('value', 'event_espresso'), |
|
1334 | 1334 | |
1335 | 1335 | // Reference: packages/form-builder/src/FormElement/Tabs/FieldOption.tsx:52 |
1336 | - __( 'label', 'event_espresso' ), |
|
1336 | + __('label', 'event_espresso'), |
|
1337 | 1337 | |
1338 | 1338 | // Reference: packages/form-builder/src/FormElement/Tabs/FieldOption.tsx:63 |
1339 | - __( 'click, hold, and drag to reorder field option', 'event_espresso' ), |
|
1339 | + __('click, hold, and drag to reorder field option', 'event_espresso'), |
|
1340 | 1340 | |
1341 | 1341 | // Reference: packages/form-builder/src/FormElement/Tabs/FieldOptions.tsx:61 |
1342 | - __( 'Options are the choices you give people to select from.', 'event_espresso' ), |
|
1342 | + __('Options are the choices you give people to select from.', 'event_espresso'), |
|
1343 | 1343 | |
1344 | 1344 | // Reference: packages/form-builder/src/FormElement/Tabs/FieldOptions.tsx:63 |
1345 | - __( 'The value is a simple key that will be saved to the database and the label is what is shown to the user.', 'event_espresso' ), |
|
1345 | + __('The value is a simple key that will be saved to the database and the label is what is shown to the user.', 'event_espresso'), |
|
1346 | 1346 | |
1347 | 1347 | // Reference: packages/form-builder/src/FormElement/Tabs/FieldOptions.tsx:96 |
1348 | - __( 'add new option', 'event_espresso' ), |
|
1348 | + __('add new option', 'event_espresso'), |
|
1349 | 1349 | |
1350 | 1350 | // Reference: packages/form-builder/src/FormElement/Tabs/FormElementTabs.tsx:26 |
1351 | 1351 | // Reference: packages/form-builder/src/FormSection/Tabs/FormSectionTabs.tsx:25 |
1352 | - __( 'Styles', 'event_espresso' ), |
|
1352 | + __('Styles', 'event_espresso'), |
|
1353 | 1353 | |
1354 | 1354 | // Reference: packages/form-builder/src/FormElement/Tabs/FormElementTabs.tsx:30 |
1355 | - __( 'Validation', 'event_espresso' ), |
|
1355 | + __('Validation', 'event_espresso'), |
|
1356 | 1356 | |
1357 | 1357 | // Reference: packages/form-builder/src/FormElement/Tabs/InputType.tsx:18 |
1358 | - __( 'Change input type', 'event_espresso' ), |
|
1358 | + __('Change input type', 'event_espresso'), |
|
1359 | 1359 | |
1360 | 1360 | // Reference: packages/form-builder/src/FormElement/Tabs/InputType.tsx:19 |
1361 | - __( 'Some configurations might be lost. Are you sure you want to change the input type?', 'event_espresso' ), |
|
1361 | + __('Some configurations might be lost. Are you sure you want to change the input type?', 'event_espresso'), |
|
1362 | 1362 | |
1363 | 1363 | // Reference: packages/form-builder/src/FormElement/Tabs/InputType.tsx:40 |
1364 | - __( 'type', 'event_espresso' ), |
|
1364 | + __('type', 'event_espresso'), |
|
1365 | 1365 | |
1366 | 1366 | // Reference: packages/form-builder/src/FormElement/Tabs/Settings.tsx:26 |
1367 | 1367 | // Reference: packages/form-builder/src/FormSection/Tabs/Settings.tsx:17 |
1368 | - __( 'public label', 'event_espresso' ), |
|
1368 | + __('public label', 'event_espresso'), |
|
1369 | 1369 | |
1370 | 1370 | // Reference: packages/form-builder/src/FormElement/Tabs/Settings.tsx:33 |
1371 | 1371 | // Reference: packages/form-builder/src/FormSection/Tabs/Settings.tsx:22 |
1372 | - __( 'admin label', 'event_espresso' ), |
|
1372 | + __('admin label', 'event_espresso'), |
|
1373 | 1373 | |
1374 | 1374 | // Reference: packages/form-builder/src/FormElement/Tabs/Settings.tsx:40 |
1375 | - __( 'content', 'event_espresso' ), |
|
1375 | + __('content', 'event_espresso'), |
|
1376 | 1376 | |
1377 | 1377 | // Reference: packages/form-builder/src/FormElement/Tabs/Settings.tsx:48 |
1378 | - __( 'options', 'event_espresso' ), |
|
1378 | + __('options', 'event_espresso'), |
|
1379 | 1379 | |
1380 | 1380 | // Reference: packages/form-builder/src/FormElement/Tabs/Settings.tsx:51 |
1381 | - __( 'placeholder', 'event_espresso' ), |
|
1381 | + __('placeholder', 'event_espresso'), |
|
1382 | 1382 | |
1383 | 1383 | // Reference: packages/form-builder/src/FormElement/Tabs/Settings.tsx:57 |
1384 | - __( 'admin only', 'event_espresso' ), |
|
1384 | + __('admin only', 'event_espresso'), |
|
1385 | 1385 | |
1386 | 1386 | // Reference: packages/form-builder/src/FormElement/Tabs/Settings.tsx:62 |
1387 | - __( 'help text', 'event_espresso' ), |
|
1387 | + __('help text', 'event_espresso'), |
|
1388 | 1388 | |
1389 | 1389 | // Reference: packages/form-builder/src/FormElement/Tabs/Settings.tsx:71 |
1390 | - __( 'maps to', 'event_espresso' ), |
|
1390 | + __('maps to', 'event_espresso'), |
|
1391 | 1391 | |
1392 | 1392 | // Reference: packages/form-builder/src/FormElement/Tabs/Styles.tsx:15 |
1393 | 1393 | // Reference: packages/form-builder/src/FormSection/Tabs/Styles.tsx:13 |
1394 | - __( 'css class', 'event_espresso' ), |
|
1394 | + __('css class', 'event_espresso'), |
|
1395 | 1395 | |
1396 | 1396 | // Reference: packages/form-builder/src/FormElement/Tabs/Styles.tsx:20 |
1397 | - __( 'help text css class', 'event_espresso' ), |
|
1397 | + __('help text css class', 'event_espresso'), |
|
1398 | 1398 | |
1399 | 1399 | // Reference: packages/form-builder/src/FormElement/Tabs/Styles.tsx:27 |
1400 | - __( 'size', 'event_espresso' ), |
|
1400 | + __('size', 'event_espresso'), |
|
1401 | 1401 | |
1402 | 1402 | // Reference: packages/form-builder/src/FormElement/Tabs/Styles.tsx:35 |
1403 | - __( 'step', 'event_espresso' ), |
|
1403 | + __('step', 'event_espresso'), |
|
1404 | 1404 | |
1405 | 1405 | // Reference: packages/form-builder/src/FormElement/Tabs/Styles.tsx:41 |
1406 | - __( 'maxlength', 'event_espresso' ), |
|
1406 | + __('maxlength', 'event_espresso'), |
|
1407 | 1407 | |
1408 | 1408 | // Reference: packages/form-builder/src/FormElement/Tabs/Validation.tsx:123 |
1409 | - __( 'min', 'event_espresso' ), |
|
1409 | + __('min', 'event_espresso'), |
|
1410 | 1410 | |
1411 | 1411 | // Reference: packages/form-builder/src/FormElement/Tabs/Validation.tsx:128 |
1412 | - __( 'max', 'event_espresso' ), |
|
1412 | + __('max', 'event_espresso'), |
|
1413 | 1413 | |
1414 | 1414 | // Reference: packages/form-builder/src/FormElement/Tabs/Validation.tsx:28 |
1415 | - __( 'Germany', 'event_espresso' ), |
|
1415 | + __('Germany', 'event_espresso'), |
|
1416 | 1416 | |
1417 | 1417 | // Reference: packages/form-builder/src/FormElement/Tabs/Validation.tsx:32 |
1418 | - __( 'France', 'event_espresso' ), |
|
1418 | + __('France', 'event_espresso'), |
|
1419 | 1419 | |
1420 | 1420 | // Reference: packages/form-builder/src/FormElement/Tabs/Validation.tsx:36 |
1421 | - __( 'United Kingdom', 'event_espresso' ), |
|
1421 | + __('United Kingdom', 'event_espresso'), |
|
1422 | 1422 | |
1423 | 1423 | // Reference: packages/form-builder/src/FormElement/Tabs/Validation.tsx:40 |
1424 | - __( 'United States', 'event_espresso' ), |
|
1424 | + __('United States', 'event_espresso'), |
|
1425 | 1425 | |
1426 | 1426 | // Reference: packages/form-builder/src/FormElement/Tabs/Validation.tsx:44 |
1427 | - __( 'Custom', 'event_espresso' ), |
|
1427 | + __('Custom', 'event_espresso'), |
|
1428 | 1428 | |
1429 | 1429 | // Reference: packages/form-builder/src/FormElement/Tabs/Validation.tsx:54 |
1430 | - __( 'required', 'event_espresso' ), |
|
1430 | + __('required', 'event_espresso'), |
|
1431 | 1431 | |
1432 | 1432 | // Reference: packages/form-builder/src/FormElement/Tabs/Validation.tsx:59 |
1433 | - __( 'required text', 'event_espresso' ), |
|
1433 | + __('required text', 'event_espresso'), |
|
1434 | 1434 | |
1435 | 1435 | // Reference: packages/form-builder/src/FormElement/Tabs/Validation.tsx:66 |
1436 | - __( 'autocomplete', 'event_espresso' ), |
|
1436 | + __('autocomplete', 'event_espresso'), |
|
1437 | 1437 | |
1438 | 1438 | // Reference: packages/form-builder/src/FormElement/Tabs/Validation.tsx:74 |
1439 | - __( 'custom format', 'event_espresso' ), |
|
1439 | + __('custom format', 'event_espresso'), |
|
1440 | 1440 | |
1441 | 1441 | // Reference: packages/form-builder/src/FormElement/Tabs/Validation.tsx:75 |
1442 | - __( 'format', 'event_espresso' ), |
|
1442 | + __('format', 'event_espresso'), |
|
1443 | 1443 | |
1444 | 1444 | // Reference: packages/form-builder/src/FormElement/Tabs/Validation.tsx:83 |
1445 | - __( 'pattern', 'event_espresso' ), |
|
1445 | + __('pattern', 'event_espresso'), |
|
1446 | 1446 | |
1447 | 1447 | // Reference: packages/form-builder/src/FormSection/AddFormElementPopover.tsx:110 |
1448 | - __( 'add new form element', 'event_espresso' ), |
|
1448 | + __('add new form element', 'event_espresso'), |
|
1449 | 1449 | |
1450 | 1450 | // Reference: packages/form-builder/src/FormSection/AddFormElementPopover.tsx:117 |
1451 | 1451 | // Reference: packages/form/src/renderers/RepeatableRenderer.tsx:52 |
1452 | - __( 'Add', 'event_espresso' ), |
|
1452 | + __('Add', 'event_espresso'), |
|
1453 | 1453 | |
1454 | 1454 | // Reference: packages/form-builder/src/FormSection/AddFormElementPopover.tsx:76 |
1455 | - __( 'Add Form Element', 'event_espresso' ), |
|
1455 | + __('Add Form Element', 'event_espresso'), |
|
1456 | 1456 | |
1457 | 1457 | // Reference: packages/form-builder/src/FormSection/AddFormElementPopover.tsx:85 |
1458 | - __( 'form element order can be changed after adding by using the drag handles in the form element toolbar', 'event_espresso' ), |
|
1458 | + __('form element order can be changed after adding by using the drag handles in the form element toolbar', 'event_espresso'), |
|
1459 | 1459 | |
1460 | 1460 | // Reference: packages/form-builder/src/FormSection/AddFormElementPopover.tsx:92 |
1461 | - __( 'load existing form section', 'event_espresso' ), |
|
1461 | + __('load existing form section', 'event_espresso'), |
|
1462 | 1462 | |
1463 | 1463 | // Reference: packages/form-builder/src/FormSection/FormSectionToolbar.tsx:32 |
1464 | - __( 'delete form section', 'event_espresso' ), |
|
1464 | + __('delete form section', 'event_espresso'), |
|
1465 | 1465 | |
1466 | 1466 | // Reference: packages/form-builder/src/FormSection/FormSectionToolbar.tsx:47 |
1467 | - __( 'form section settings', 'event_espresso' ), |
|
1467 | + __('form section settings', 'event_espresso'), |
|
1468 | 1468 | |
1469 | 1469 | // Reference: packages/form-builder/src/FormSection/FormSectionToolbar.tsx:57 |
1470 | - __( 'copy form section', 'event_espresso' ), |
|
1470 | + __('copy form section', 'event_espresso'), |
|
1471 | 1471 | |
1472 | 1472 | // Reference: packages/form-builder/src/FormSection/FormSectionToolbar.tsx:74 |
1473 | - __( 'click, hold, and drag to reorder form section', 'event_espresso' ), |
|
1473 | + __('click, hold, and drag to reorder form section', 'event_espresso'), |
|
1474 | 1474 | |
1475 | 1475 | // Reference: packages/form-builder/src/FormSection/FormSections.tsx:26 |
1476 | - __( 'Add Form Section', 'event_espresso' ), |
|
1476 | + __('Add Form Section', 'event_espresso'), |
|
1477 | 1477 | |
1478 | 1478 | // Reference: packages/form-builder/src/FormSection/SaveSection.tsx:47 |
1479 | - __( 'save form section for use in other forms', 'event_espresso' ), |
|
1479 | + __('save form section for use in other forms', 'event_espresso'), |
|
1480 | 1480 | |
1481 | 1481 | // Reference: packages/form-builder/src/FormSection/SaveSection.tsx:51 |
1482 | - __( 'save as', 'event_espresso' ), |
|
1482 | + __('save as', 'event_espresso'), |
|
1483 | 1483 | |
1484 | 1484 | // Reference: packages/form-builder/src/FormSection/SaveSection.tsx:55 |
1485 | - __( 'default', 'event_espresso' ), |
|
1485 | + __('default', 'event_espresso'), |
|
1486 | 1486 | |
1487 | 1487 | // Reference: packages/form-builder/src/FormSection/SaveSection.tsx:58 |
1488 | - __( ' a copy of this form section will be automatically added to ALL new events', 'event_espresso' ), |
|
1488 | + __(' a copy of this form section will be automatically added to ALL new events', 'event_espresso'), |
|
1489 | 1489 | |
1490 | 1490 | // Reference: packages/form-builder/src/FormSection/SaveSection.tsx:61 |
1491 | - __( 'shared', 'event_espresso' ), |
|
1491 | + __('shared', 'event_espresso'), |
|
1492 | 1492 | |
1493 | 1493 | // Reference: packages/form-builder/src/FormSection/SaveSection.tsx:64 |
1494 | - __( 'a copy of this form section will be saved for use in other events but not loaded by default', 'event_espresso' ), |
|
1494 | + __('a copy of this form section will be saved for use in other events but not loaded by default', 'event_espresso'), |
|
1495 | 1495 | |
1496 | 1496 | // Reference: packages/form-builder/src/FormSection/Tabs/Settings.tsx:27 |
1497 | - __( 'show label', 'event_espresso' ), |
|
1497 | + __('show label', 'event_espresso'), |
|
1498 | 1498 | |
1499 | 1499 | // Reference: packages/form-builder/src/FormSection/Tabs/Settings.tsx:33 |
1500 | - __( 'applies to', 'event_espresso' ), |
|
1500 | + __('applies to', 'event_espresso'), |
|
1501 | 1501 | |
1502 | 1502 | // Reference: packages/form-builder/src/constants.ts:102 |
1503 | 1503 | // Reference: packages/form-builder/src/state/utils.ts:436 |
1504 | - __( 'URL', 'event_espresso' ), |
|
1504 | + __('URL', 'event_espresso'), |
|
1505 | 1505 | |
1506 | 1506 | // Reference: packages/form-builder/src/constants.ts:104 |
1507 | - __( 'adds a text input for entering a URL address', 'event_espresso' ), |
|
1507 | + __('adds a text input for entering a URL address', 'event_espresso'), |
|
1508 | 1508 | |
1509 | 1509 | // Reference: packages/form-builder/src/constants.ts:107 |
1510 | - __( 'Date', 'event_espresso' ), |
|
1510 | + __('Date', 'event_espresso'), |
|
1511 | 1511 | |
1512 | 1512 | // Reference: packages/form-builder/src/constants.ts:109 |
1513 | - __( 'adds a text input that allows users to enter a date directly via keyboard or a datepicker', 'event_espresso' ), |
|
1513 | + __('adds a text input that allows users to enter a date directly via keyboard or a datepicker', 'event_espresso'), |
|
1514 | 1514 | |
1515 | 1515 | // Reference: packages/form-builder/src/constants.ts:112 |
1516 | 1516 | // Reference: packages/form-builder/src/state/utils.ts:369 |
1517 | - __( 'Local Date', 'event_espresso' ), |
|
1517 | + __('Local Date', 'event_espresso'), |
|
1518 | 1518 | |
1519 | 1519 | // Reference: packages/form-builder/src/constants.ts:117 |
1520 | - __( 'Month', 'event_espresso' ), |
|
1520 | + __('Month', 'event_espresso'), |
|
1521 | 1521 | |
1522 | 1522 | // Reference: packages/form-builder/src/constants.ts:119 |
1523 | - __( 'adds a text input that allows users to enter a month and year directly via keyboard or a datepicker', 'event_espresso' ), |
|
1523 | + __('adds a text input that allows users to enter a month and year directly via keyboard or a datepicker', 'event_espresso'), |
|
1524 | 1524 | |
1525 | 1525 | // Reference: packages/form-builder/src/constants.ts:122 |
1526 | - __( 'Time', 'event_espresso' ), |
|
1526 | + __('Time', 'event_espresso'), |
|
1527 | 1527 | |
1528 | 1528 | // Reference: packages/form-builder/src/constants.ts:124 |
1529 | - __( 'adds a text input that allows users to enter a time directly via keyboard or a timepicker', 'event_espresso' ), |
|
1529 | + __('adds a text input that allows users to enter a time directly via keyboard or a timepicker', 'event_espresso'), |
|
1530 | 1530 | |
1531 | 1531 | // Reference: packages/form-builder/src/constants.ts:127 |
1532 | - __( 'Week', 'event_espresso' ), |
|
1532 | + __('Week', 'event_espresso'), |
|
1533 | 1533 | |
1534 | 1534 | // Reference: packages/form-builder/src/constants.ts:129 |
1535 | - __( 'adds a text input that allows users to enter a week and year directly via keyboard or a datepicker', 'event_espresso' ), |
|
1535 | + __('adds a text input that allows users to enter a week and year directly via keyboard or a datepicker', 'event_espresso'), |
|
1536 | 1536 | |
1537 | 1537 | // Reference: packages/form-builder/src/constants.ts:132 |
1538 | - __( 'Day Selector', 'event_espresso' ), |
|
1538 | + __('Day Selector', 'event_espresso'), |
|
1539 | 1539 | |
1540 | 1540 | // Reference: packages/form-builder/src/constants.ts:134 |
1541 | - __( 'adds a dropdown selector that allows users to select the day of the month (01 to 31)', 'event_espresso' ), |
|
1541 | + __('adds a dropdown selector that allows users to select the day of the month (01 to 31)', 'event_espresso'), |
|
1542 | 1542 | |
1543 | 1543 | // Reference: packages/form-builder/src/constants.ts:137 |
1544 | - __( 'Month Selector', 'event_espresso' ), |
|
1544 | + __('Month Selector', 'event_espresso'), |
|
1545 | 1545 | |
1546 | 1546 | // Reference: packages/form-builder/src/constants.ts:139 |
1547 | - __( 'adds a dropdown selector that allows users to select the month of the year (01 to 12)', 'event_espresso' ), |
|
1547 | + __('adds a dropdown selector that allows users to select the month of the year (01 to 12)', 'event_espresso'), |
|
1548 | 1548 | |
1549 | 1549 | // Reference: packages/form-builder/src/constants.ts:142 |
1550 | - __( 'Year Selector', 'event_espresso' ), |
|
1550 | + __('Year Selector', 'event_espresso'), |
|
1551 | 1551 | |
1552 | 1552 | // Reference: packages/form-builder/src/constants.ts:144 |
1553 | - __( 'adds a dropdown selector that allows users to select the year from a configurable range', 'event_espresso' ), |
|
1553 | + __('adds a dropdown selector that allows users to select the year from a configurable range', 'event_espresso'), |
|
1554 | 1554 | |
1555 | 1555 | // Reference: packages/form-builder/src/constants.ts:147 |
1556 | - __( 'Radio Buttons', 'event_espresso' ), |
|
1556 | + __('Radio Buttons', 'event_espresso'), |
|
1557 | 1557 | |
1558 | 1558 | // Reference: packages/form-builder/src/constants.ts:149 |
1559 | - __( 'adds one or more radio buttons that allow users to only select one option from those provided', 'event_espresso' ), |
|
1559 | + __('adds one or more radio buttons that allow users to only select one option from those provided', 'event_espresso'), |
|
1560 | 1560 | |
1561 | 1561 | // Reference: packages/form-builder/src/constants.ts:152 |
1562 | 1562 | // Reference: packages/form-builder/src/state/utils.ts:375 |
1563 | - __( 'Decimal Number', 'event_espresso' ), |
|
1563 | + __('Decimal Number', 'event_espresso'), |
|
1564 | 1564 | |
1565 | 1565 | // Reference: packages/form-builder/src/constants.ts:154 |
1566 | - __( 'adds a text input that only accepts numbers whose value is a decimal (float)', 'event_espresso' ), |
|
1566 | + __('adds a text input that only accepts numbers whose value is a decimal (float)', 'event_espresso'), |
|
1567 | 1567 | |
1568 | 1568 | // Reference: packages/form-builder/src/constants.ts:157 |
1569 | 1569 | // Reference: packages/form-builder/src/state/utils.ts:378 |
1570 | - __( 'Whole Number', 'event_espresso' ), |
|
1570 | + __('Whole Number', 'event_espresso'), |
|
1571 | 1571 | |
1572 | 1572 | // Reference: packages/form-builder/src/constants.ts:159 |
1573 | - __( 'adds a text input that only accepts numbers whose value is an integer (whole number)', 'event_espresso' ), |
|
1573 | + __('adds a text input that only accepts numbers whose value is an integer (whole number)', 'event_espresso'), |
|
1574 | 1574 | |
1575 | 1575 | // Reference: packages/form-builder/src/constants.ts:162 |
1576 | - __( 'Number Range', 'event_espresso' ), |
|
1576 | + __('Number Range', 'event_espresso'), |
|
1577 | 1577 | |
1578 | 1578 | // Reference: packages/form-builder/src/constants.ts:167 |
1579 | - __( 'Phone Number', 'event_espresso' ), |
|
1579 | + __('Phone Number', 'event_espresso'), |
|
1580 | 1580 | |
1581 | 1581 | // Reference: packages/form-builder/src/constants.ts:172 |
1582 | - __( 'Dropdown', 'event_espresso' ), |
|
1582 | + __('Dropdown', 'event_espresso'), |
|
1583 | 1583 | |
1584 | 1584 | // Reference: packages/form-builder/src/constants.ts:174 |
1585 | - __( 'adds a dropdown selector that accepts a single value', 'event_espresso' ), |
|
1585 | + __('adds a dropdown selector that accepts a single value', 'event_espresso'), |
|
1586 | 1586 | |
1587 | 1587 | // Reference: packages/form-builder/src/constants.ts:177 |
1588 | - __( 'Multi Select', 'event_espresso' ), |
|
1588 | + __('Multi Select', 'event_espresso'), |
|
1589 | 1589 | |
1590 | 1590 | // Reference: packages/form-builder/src/constants.ts:179 |
1591 | - __( 'adds a dropdown selector that accepts multiple values', 'event_espresso' ), |
|
1591 | + __('adds a dropdown selector that accepts multiple values', 'event_espresso'), |
|
1592 | 1592 | |
1593 | 1593 | // Reference: packages/form-builder/src/constants.ts:182 |
1594 | - __( 'Toggle/Switch', 'event_espresso' ), |
|
1594 | + __('Toggle/Switch', 'event_espresso'), |
|
1595 | 1595 | |
1596 | 1596 | // Reference: packages/form-builder/src/constants.ts:184 |
1597 | - __( 'adds a toggle or a switch to accept true or false value', 'event_espresso' ), |
|
1597 | + __('adds a toggle or a switch to accept true or false value', 'event_espresso'), |
|
1598 | 1598 | |
1599 | 1599 | // Reference: packages/form-builder/src/constants.ts:187 |
1600 | - __( 'Multi Checkbox', 'event_espresso' ), |
|
1600 | + __('Multi Checkbox', 'event_espresso'), |
|
1601 | 1601 | |
1602 | 1602 | // Reference: packages/form-builder/src/constants.ts:189 |
1603 | - __( 'adds checkboxes that allow users to select zero or more options from those provided', 'event_espresso' ), |
|
1603 | + __('adds checkboxes that allow users to select zero or more options from those provided', 'event_espresso'), |
|
1604 | 1604 | |
1605 | 1605 | // Reference: packages/form-builder/src/constants.ts:192 |
1606 | - __( 'Country Selector', 'event_espresso' ), |
|
1606 | + __('Country Selector', 'event_espresso'), |
|
1607 | 1607 | |
1608 | 1608 | // Reference: packages/form-builder/src/constants.ts:194 |
1609 | - __( 'adds a dropdown selector populated with names of countries that are enabled for the site', 'event_espresso' ), |
|
1609 | + __('adds a dropdown selector populated with names of countries that are enabled for the site', 'event_espresso'), |
|
1610 | 1610 | |
1611 | 1611 | // Reference: packages/form-builder/src/constants.ts:197 |
1612 | - __( 'State Selector', 'event_espresso' ), |
|
1612 | + __('State Selector', 'event_espresso'), |
|
1613 | 1613 | |
1614 | 1614 | // Reference: packages/form-builder/src/constants.ts:202 |
1615 | - __( 'Button', 'event_espresso' ), |
|
1615 | + __('Button', 'event_espresso'), |
|
1616 | 1616 | |
1617 | 1617 | // Reference: packages/form-builder/src/constants.ts:204 |
1618 | - __( 'adds a button to the form that can be used for triggering fucntionality (requires custom coding)', 'event_espresso' ), |
|
1618 | + __('adds a button to the form that can be used for triggering fucntionality (requires custom coding)', 'event_espresso'), |
|
1619 | 1619 | |
1620 | 1620 | // Reference: packages/form-builder/src/constants.ts:207 |
1621 | - __( 'Reset Button', 'event_espresso' ), |
|
1621 | + __('Reset Button', 'event_espresso'), |
|
1622 | 1622 | |
1623 | 1623 | // Reference: packages/form-builder/src/constants.ts:209 |
1624 | - __( 'adds a button that will reset the form back to its original state.', 'event_espresso' ), |
|
1624 | + __('adds a button that will reset the form back to its original state.', 'event_espresso'), |
|
1625 | 1625 | |
1626 | 1626 | // Reference: packages/form-builder/src/constants.ts:55 |
1627 | - __( 'Form Section', 'event_espresso' ), |
|
1627 | + __('Form Section', 'event_espresso'), |
|
1628 | 1628 | |
1629 | 1629 | // Reference: packages/form-builder/src/constants.ts:57 |
1630 | - __( 'Used for creating logical groupings for questions and form elements. Need to add a heading or description? Use the HTML form element.', 'event_espresso' ), |
|
1630 | + __('Used for creating logical groupings for questions and form elements. Need to add a heading or description? Use the HTML form element.', 'event_espresso'), |
|
1631 | 1631 | |
1632 | 1632 | // Reference: packages/form-builder/src/constants.ts:62 |
1633 | - __( 'HTML Block', 'event_espresso' ), |
|
1633 | + __('HTML Block', 'event_espresso'), |
|
1634 | 1634 | |
1635 | 1635 | // Reference: packages/form-builder/src/constants.ts:64 |
1636 | - __( 'allows you to add HTML like headings or text paragraphs to your form', 'event_espresso' ), |
|
1636 | + __('allows you to add HTML like headings or text paragraphs to your form', 'event_espresso'), |
|
1637 | 1637 | |
1638 | 1638 | // Reference: packages/form-builder/src/constants.ts:69 |
1639 | - __( 'adds a text input that only accepts plain text', 'event_espresso' ), |
|
1639 | + __('adds a text input that only accepts plain text', 'event_espresso'), |
|
1640 | 1640 | |
1641 | 1641 | // Reference: packages/form-builder/src/constants.ts:72 |
1642 | - __( 'Plain Text Area', 'event_espresso' ), |
|
1642 | + __('Plain Text Area', 'event_espresso'), |
|
1643 | 1643 | |
1644 | 1644 | // Reference: packages/form-builder/src/constants.ts:74 |
1645 | - __( 'adds a textarea block that only accepts plain text', 'event_espresso' ), |
|
1645 | + __('adds a textarea block that only accepts plain text', 'event_espresso'), |
|
1646 | 1646 | |
1647 | 1647 | // Reference: packages/form-builder/src/constants.ts:77 |
1648 | - __( 'HTML Text Area', 'event_espresso' ), |
|
1648 | + __('HTML Text Area', 'event_espresso'), |
|
1649 | 1649 | |
1650 | 1650 | // Reference: packages/form-builder/src/constants.ts:79 |
1651 | - __( 'adds a textarea block that accepts text including simple HTML markup', 'event_espresso' ), |
|
1651 | + __('adds a textarea block that accepts text including simple HTML markup', 'event_espresso'), |
|
1652 | 1652 | |
1653 | 1653 | // Reference: packages/form-builder/src/constants.ts:84 |
1654 | - __( 'adds a text input that only accepts a valid email address', 'event_espresso' ), |
|
1654 | + __('adds a text input that only accepts a valid email address', 'event_espresso'), |
|
1655 | 1655 | |
1656 | 1656 | // Reference: packages/form-builder/src/constants.ts:87 |
1657 | - __( 'Email Confirmation', 'event_espresso' ), |
|
1657 | + __('Email Confirmation', 'event_espresso'), |
|
1658 | 1658 | |
1659 | 1659 | // Reference: packages/form-builder/src/constants.ts:92 |
1660 | - __( 'Password', 'event_espresso' ), |
|
1660 | + __('Password', 'event_espresso'), |
|
1661 | 1661 | |
1662 | 1662 | // Reference: packages/form-builder/src/constants.ts:94 |
1663 | - __( 'adds a text input that accepts text but masks what the user enters', 'event_espresso' ), |
|
1663 | + __('adds a text input that accepts text but masks what the user enters', 'event_espresso'), |
|
1664 | 1664 | |
1665 | 1665 | // Reference: packages/form-builder/src/constants.ts:97 |
1666 | - __( 'Password Confirmation', 'event_espresso' ), |
|
1666 | + __('Password Confirmation', 'event_espresso'), |
|
1667 | 1667 | |
1668 | 1668 | // Reference: packages/form-builder/src/data/useElementMutator.ts:54 |
1669 | - __( 'element', 'event_espresso' ), |
|
1669 | + __('element', 'event_espresso'), |
|
1670 | 1670 | |
1671 | 1671 | // Reference: packages/form-builder/src/data/useSectionMutator.ts:54 |
1672 | - __( 'section', 'event_espresso' ), |
|
1672 | + __('section', 'event_espresso'), |
|
1673 | 1673 | |
1674 | 1674 | // Reference: packages/form-builder/src/state/utils.ts:360 |
1675 | - __( 'click', 'event_espresso' ), |
|
1675 | + __('click', 'event_espresso'), |
|
1676 | 1676 | |
1677 | 1677 | // Reference: packages/form-builder/src/state/utils.ts:363 |
1678 | - __( 'checkboxes', 'event_espresso' ), |
|
1678 | + __('checkboxes', 'event_espresso'), |
|
1679 | 1679 | |
1680 | 1680 | // Reference: packages/form-builder/src/state/utils.ts:366 |
1681 | - __( 'date', 'event_espresso' ), |
|
1681 | + __('date', 'event_espresso'), |
|
1682 | 1682 | |
1683 | 1683 | // Reference: packages/form-builder/src/state/utils.ts:372 |
1684 | - __( 'day', 'event_espresso' ), |
|
1684 | + __('day', 'event_espresso'), |
|
1685 | 1685 | |
1686 | 1686 | // Reference: packages/form-builder/src/state/utils.ts:381 |
1687 | - __( 'email address', 'event_espresso' ), |
|
1687 | + __('email address', 'event_espresso'), |
|
1688 | 1688 | |
1689 | 1689 | // Reference: packages/form-builder/src/state/utils.ts:384 |
1690 | - __( 'confirm email address', 'event_espresso' ), |
|
1690 | + __('confirm email address', 'event_espresso'), |
|
1691 | 1691 | |
1692 | 1692 | // Reference: packages/form-builder/src/state/utils.ts:388 |
1693 | - __( 'month', 'event_espresso' ), |
|
1693 | + __('month', 'event_espresso'), |
|
1694 | 1694 | |
1695 | 1695 | // Reference: packages/form-builder/src/state/utils.ts:391 |
1696 | - __( 'password', 'event_espresso' ), |
|
1696 | + __('password', 'event_espresso'), |
|
1697 | 1697 | |
1698 | 1698 | // Reference: packages/form-builder/src/state/utils.ts:394 |
1699 | - __( 'confirm password', 'event_espresso' ), |
|
1699 | + __('confirm password', 'event_espresso'), |
|
1700 | 1700 | |
1701 | 1701 | // Reference: packages/form-builder/src/state/utils.ts:397 |
1702 | - __( 'radio buttons', 'event_espresso' ), |
|
1702 | + __('radio buttons', 'event_espresso'), |
|
1703 | 1703 | |
1704 | 1704 | // Reference: packages/form-builder/src/state/utils.ts:400 |
1705 | - __( 'number range', 'event_espresso' ), |
|
1705 | + __('number range', 'event_espresso'), |
|
1706 | 1706 | |
1707 | 1707 | // Reference: packages/form-builder/src/state/utils.ts:403 |
1708 | - __( 'selection dropdown', 'event_espresso' ), |
|
1708 | + __('selection dropdown', 'event_espresso'), |
|
1709 | 1709 | |
1710 | 1710 | // Reference: packages/form-builder/src/state/utils.ts:406 |
1711 | - __( 'country', 'event_espresso' ), |
|
1711 | + __('country', 'event_espresso'), |
|
1712 | 1712 | |
1713 | 1713 | // Reference: packages/form-builder/src/state/utils.ts:409 |
1714 | - __( 'multi-select dropdown', 'event_espresso' ), |
|
1714 | + __('multi-select dropdown', 'event_espresso'), |
|
1715 | 1715 | |
1716 | 1716 | // Reference: packages/form-builder/src/state/utils.ts:412 |
1717 | - __( 'state/province', 'event_espresso' ), |
|
1717 | + __('state/province', 'event_espresso'), |
|
1718 | 1718 | |
1719 | 1719 | // Reference: packages/form-builder/src/state/utils.ts:415 |
1720 | - __( 'on/off switch', 'event_espresso' ), |
|
1720 | + __('on/off switch', 'event_espresso'), |
|
1721 | 1721 | |
1722 | 1722 | // Reference: packages/form-builder/src/state/utils.ts:418 |
1723 | - __( 'reset', 'event_espresso' ), |
|
1723 | + __('reset', 'event_espresso'), |
|
1724 | 1724 | |
1725 | 1725 | // Reference: packages/form-builder/src/state/utils.ts:421 |
1726 | - __( 'phone number', 'event_espresso' ), |
|
1726 | + __('phone number', 'event_espresso'), |
|
1727 | 1727 | |
1728 | 1728 | // Reference: packages/form-builder/src/state/utils.ts:424 |
1729 | - __( 'text', 'event_espresso' ), |
|
1729 | + __('text', 'event_espresso'), |
|
1730 | 1730 | |
1731 | 1731 | // Reference: packages/form-builder/src/state/utils.ts:427 |
1732 | - __( 'simple textarea', 'event_espresso' ), |
|
1732 | + __('simple textarea', 'event_espresso'), |
|
1733 | 1733 | |
1734 | 1734 | // Reference: packages/form-builder/src/state/utils.ts:430 |
1735 | - __( 'html textarea', 'event_espresso' ), |
|
1735 | + __('html textarea', 'event_espresso'), |
|
1736 | 1736 | |
1737 | 1737 | // Reference: packages/form-builder/src/state/utils.ts:439 |
1738 | - __( 'week', 'event_espresso' ), |
|
1738 | + __('week', 'event_espresso'), |
|
1739 | 1739 | |
1740 | 1740 | // Reference: packages/form-builder/src/state/utils.ts:442 |
1741 | - __( 'year', 'event_espresso' ), |
|
1741 | + __('year', 'event_espresso'), |
|
1742 | 1742 | |
1743 | 1743 | // Reference: packages/form/src/adapters/WPMediaImage.tsx:13 |
1744 | - __( 'Select Image', 'event_espresso' ), |
|
1744 | + __('Select Image', 'event_espresso'), |
|
1745 | 1745 | |
1746 | 1746 | // Reference: packages/form/src/adapters/WPMediaImage.tsx:45 |
1747 | 1747 | // Reference: packages/rich-text-editor/src/components/AdvancedTextEditor/toolbarButtons/WPMedia.tsx:11 |
1748 | 1748 | // Reference: packages/rich-text-editor/src/rte-old/components/toolbarButtons/WPMedia.tsx:12 |
1749 | 1749 | // Reference: packages/ui-components/src/SimpleEntityList/EntityTemplate.tsx:32 |
1750 | - __( 'Select', 'event_espresso' ), |
|
1750 | + __('Select', 'event_espresso'), |
|
1751 | 1751 | |
1752 | 1752 | // Reference: packages/form/src/renderers/FormRenderer.tsx:51 |
1753 | - __( 'Form Errors', 'event_espresso' ), |
|
1753 | + __('Form Errors', 'event_espresso'), |
|
1754 | 1754 | |
1755 | 1755 | // Reference: packages/form/src/renderers/RepeatableRenderer.tsx:36 |
1756 | 1756 | /* translators: %d the entry number */ |
1757 | - __( 'Entry %d', 'event_espresso' ), |
|
1757 | + __('Entry %d', 'event_espresso'), |
|
1758 | 1758 | |
1759 | 1759 | // Reference: packages/helpers/src/datetimes/getStatusTextLabel.ts:11 |
1760 | 1760 | // Reference: packages/helpers/src/tickets/getStatusTextLabel.ts:17 |
1761 | - __( 'sold out', 'event_espresso' ), |
|
1761 | + __('sold out', 'event_espresso'), |
|
1762 | 1762 | |
1763 | 1763 | // Reference: packages/helpers/src/datetimes/getStatusTextLabel.ts:14 |
1764 | 1764 | // Reference: packages/helpers/src/tickets/getStatusTextLabel.ts:14 |
1765 | - __( 'expired', 'event_espresso' ), |
|
1765 | + __('expired', 'event_espresso'), |
|
1766 | 1766 | |
1767 | 1767 | // Reference: packages/helpers/src/datetimes/getStatusTextLabel.ts:17 |
1768 | - __( 'upcoming', 'event_espresso' ), |
|
1768 | + __('upcoming', 'event_espresso'), |
|
1769 | 1769 | |
1770 | 1770 | // Reference: packages/helpers/src/datetimes/getStatusTextLabel.ts:20 |
1771 | - __( 'active', 'event_espresso' ), |
|
1771 | + __('active', 'event_espresso'), |
|
1772 | 1772 | |
1773 | 1773 | // Reference: packages/helpers/src/datetimes/getStatusTextLabel.ts:23 |
1774 | 1774 | // Reference: packages/helpers/src/tickets/getStatusTextLabel.ts:11 |
1775 | - __( 'trashed', 'event_espresso' ), |
|
1775 | + __('trashed', 'event_espresso'), |
|
1776 | 1776 | |
1777 | 1777 | // Reference: packages/helpers/src/datetimes/getStatusTextLabel.ts:26 |
1778 | - __( 'cancelled', 'event_espresso' ), |
|
1778 | + __('cancelled', 'event_espresso'), |
|
1779 | 1779 | |
1780 | 1780 | // Reference: packages/helpers/src/datetimes/getStatusTextLabel.ts:29 |
1781 | - __( 'postponed', 'event_espresso' ), |
|
1781 | + __('postponed', 'event_espresso'), |
|
1782 | 1782 | |
1783 | 1783 | // Reference: packages/helpers/src/datetimes/getStatusTextLabel.ts:33 |
1784 | - __( 'inactive', 'event_espresso' ), |
|
1784 | + __('inactive', 'event_espresso'), |
|
1785 | 1785 | |
1786 | 1786 | // Reference: packages/helpers/src/tickets/getStatusTextLabel.ts:20 |
1787 | - __( 'pending', 'event_espresso' ), |
|
1787 | + __('pending', 'event_espresso'), |
|
1788 | 1788 | |
1789 | 1789 | // Reference: packages/helpers/src/tickets/getStatusTextLabel.ts:23 |
1790 | - __( 'on sale', 'event_espresso' ), |
|
1790 | + __('on sale', 'event_espresso'), |
|
1791 | 1791 | |
1792 | 1792 | // Reference: packages/helpers/src/tickets/ticketVisibilityOptions.ts:6 |
1793 | - __( 'Where the ticket can be viewed throughout the UI. ', 'event_espresso' ), |
|
1793 | + __('Where the ticket can be viewed throughout the UI. ', 'event_espresso'), |
|
1794 | 1794 | |
1795 | 1795 | // Reference: packages/predicates/src/registration/statusOptions.ts:16 |
1796 | - __( 'Declined', 'event_espresso' ), |
|
1796 | + __('Declined', 'event_espresso'), |
|
1797 | 1797 | |
1798 | 1798 | // Reference: packages/predicates/src/registration/statusOptions.ts:21 |
1799 | - __( 'Incomplete', 'event_espresso' ), |
|
1799 | + __('Incomplete', 'event_espresso'), |
|
1800 | 1800 | |
1801 | 1801 | // Reference: packages/predicates/src/registration/statusOptions.ts:26 |
1802 | - __( 'Not Approved', 'event_espresso' ), |
|
1802 | + __('Not Approved', 'event_espresso'), |
|
1803 | 1803 | |
1804 | 1804 | // Reference: packages/predicates/src/registration/statusOptions.ts:31 |
1805 | - __( 'Pending Payment', 'event_espresso' ), |
|
1805 | + __('Pending Payment', 'event_espresso'), |
|
1806 | 1806 | |
1807 | 1807 | // Reference: packages/predicates/src/registration/statusOptions.ts:36 |
1808 | - __( 'Wait List', 'event_espresso' ), |
|
1808 | + __('Wait List', 'event_espresso'), |
|
1809 | 1809 | |
1810 | 1810 | // Reference: packages/predicates/src/registration/statusOptions.ts:6 |
1811 | - __( 'Approved', 'event_espresso' ), |
|
1811 | + __('Approved', 'event_espresso'), |
|
1812 | 1812 | |
1813 | 1813 | // Reference: packages/rich-text-editor/src/components/AdvancedTextEditor/toolbarButtons/WPMedia.tsx:9 |
1814 | 1814 | // Reference: packages/rich-text-editor/src/rte-old/components/toolbarButtons/WPMedia.tsx:10 |
1815 | - __( 'Select media', 'event_espresso' ), |
|
1815 | + __('Select media', 'event_espresso'), |
|
1816 | 1816 | |
1817 | 1817 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/RichTextEditor.tsx:84 |
1818 | - __( 'Write something…', 'event_espresso' ), |
|
1818 | + __('Write something…', 'event_espresso'), |
|
1819 | 1819 | |
1820 | 1820 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/Toolbar.tsx:20 |
1821 | - __( 'RTE Toolbar', 'event_espresso' ), |
|
1821 | + __('RTE Toolbar', 'event_espresso'), |
|
1822 | 1822 | |
1823 | 1823 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/blockType/Component.tsx:11 |
1824 | - __( 'Normal', 'event_espresso' ), |
|
1824 | + __('Normal', 'event_espresso'), |
|
1825 | 1825 | |
1826 | 1826 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/blockType/Component.tsx:12 |
1827 | - __( 'H1', 'event_espresso' ), |
|
1827 | + __('H1', 'event_espresso'), |
|
1828 | 1828 | |
1829 | 1829 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/blockType/Component.tsx:13 |
1830 | - __( 'H2', 'event_espresso' ), |
|
1830 | + __('H2', 'event_espresso'), |
|
1831 | 1831 | |
1832 | 1832 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/blockType/Component.tsx:14 |
1833 | - __( 'H3', 'event_espresso' ), |
|
1833 | + __('H3', 'event_espresso'), |
|
1834 | 1834 | |
1835 | 1835 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/blockType/Component.tsx:15 |
1836 | - __( 'H4', 'event_espresso' ), |
|
1836 | + __('H4', 'event_espresso'), |
|
1837 | 1837 | |
1838 | 1838 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/blockType/Component.tsx:16 |
1839 | - __( 'H5', 'event_espresso' ), |
|
1839 | + __('H5', 'event_espresso'), |
|
1840 | 1840 | |
1841 | 1841 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/blockType/Component.tsx:17 |
1842 | - __( 'H6', 'event_espresso' ), |
|
1842 | + __('H6', 'event_espresso'), |
|
1843 | 1843 | |
1844 | 1844 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/blockType/Component.tsx:18 |
1845 | - __( 'Block quote', 'event_espresso' ), |
|
1845 | + __('Block quote', 'event_espresso'), |
|
1846 | 1846 | |
1847 | 1847 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/blockType/Component.tsx:19 |
1848 | - __( 'Code', 'event_espresso' ), |
|
1848 | + __('Code', 'event_espresso'), |
|
1849 | 1849 | |
1850 | 1850 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/colorPicker/Component.tsx:36 |
1851 | - __( 'Set color', 'event_espresso' ), |
|
1851 | + __('Set color', 'event_espresso'), |
|
1852 | 1852 | |
1853 | 1853 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/colorPicker/Component.tsx:45 |
1854 | - __( 'Text color', 'event_espresso' ), |
|
1854 | + __('Text color', 'event_espresso'), |
|
1855 | 1855 | |
1856 | 1856 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/colorPicker/Component.tsx:47 |
1857 | - __( 'Background color', 'event_espresso' ), |
|
1857 | + __('Background color', 'event_espresso'), |
|
1858 | 1858 | |
1859 | 1859 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/image/Component.tsx:39 |
1860 | - __( 'Add image', 'event_espresso' ), |
|
1860 | + __('Add image', 'event_espresso'), |
|
1861 | 1861 | |
1862 | 1862 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/image/Component.tsx:51 |
1863 | - __( 'Image URL', 'event_espresso' ), |
|
1863 | + __('Image URL', 'event_espresso'), |
|
1864 | 1864 | |
1865 | 1865 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/image/Component.tsx:55 |
1866 | - __( 'Alt text', 'event_espresso' ), |
|
1866 | + __('Alt text', 'event_espresso'), |
|
1867 | 1867 | |
1868 | 1868 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/image/Component.tsx:56 |
1869 | - __( 'Width', 'event_espresso' ), |
|
1869 | + __('Width', 'event_espresso'), |
|
1870 | 1870 | |
1871 | 1871 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/image/Component.tsx:60 |
1872 | - __( 'Height', 'event_espresso' ), |
|
1872 | + __('Height', 'event_espresso'), |
|
1873 | 1873 | |
1874 | 1874 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/link/Component.tsx:54 |
1875 | - __( 'Edit link', 'event_espresso' ), |
|
1875 | + __('Edit link', 'event_espresso'), |
|
1876 | 1876 | |
1877 | 1877 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/link/Component.tsx:64 |
1878 | - __( 'URL title', 'event_espresso' ), |
|
1878 | + __('URL title', 'event_espresso'), |
|
1879 | 1879 | |
1880 | 1880 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/list/Component.tsx:11 |
1881 | - __( 'Unordered list', 'event_espresso' ), |
|
1881 | + __('Unordered list', 'event_espresso'), |
|
1882 | 1882 | |
1883 | 1883 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/list/Component.tsx:12 |
1884 | - __( 'Ordered list', 'event_espresso' ), |
|
1884 | + __('Ordered list', 'event_espresso'), |
|
1885 | 1885 | |
1886 | 1886 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/list/Component.tsx:13 |
1887 | 1887 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/textAlign/Component.tsx:13 |
1888 | - __( 'Indent', 'event_espresso' ), |
|
1888 | + __('Indent', 'event_espresso'), |
|
1889 | 1889 | |
1890 | 1890 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/list/Component.tsx:14 |
1891 | 1891 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/textAlign/Component.tsx:14 |
1892 | - __( 'Outdent', 'event_espresso' ), |
|
1892 | + __('Outdent', 'event_espresso'), |
|
1893 | 1893 | |
1894 | 1894 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/textAlign/Component.tsx:11 |
1895 | - __( 'Unordered textalign', 'event_espresso' ), |
|
1895 | + __('Unordered textalign', 'event_espresso'), |
|
1896 | 1896 | |
1897 | 1897 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/textAlign/Component.tsx:12 |
1898 | - __( 'Ordered textalign', 'event_espresso' ), |
|
1898 | + __('Ordered textalign', 'event_espresso'), |
|
1899 | 1899 | |
1900 | 1900 | // Reference: packages/rich-text-editor/src/components/RichTextEditor/render/Image/Toolbar.tsx:32 |
1901 | - __( 'Image toolbar', 'event_espresso' ), |
|
1901 | + __('Image toolbar', 'event_espresso'), |
|
1902 | 1902 | |
1903 | 1903 | // Reference: packages/rich-text-editor/src/components/WithEditMode/WithEditMode.tsx:62 |
1904 | 1904 | // Reference: packages/rich-text-editor/src/rte-old/components/RTEWithEditMode/RTEWithEditMode.tsx:35 |
1905 | - __( 'Visual editor', 'event_espresso' ), |
|
1905 | + __('Visual editor', 'event_espresso'), |
|
1906 | 1906 | |
1907 | 1907 | // Reference: packages/rich-text-editor/src/components/WithEditMode/WithEditMode.tsx:66 |
1908 | 1908 | // Reference: packages/rich-text-editor/src/rte-old/components/RTEWithEditMode/RTEWithEditMode.tsx:39 |
1909 | - __( 'HTML editor', 'event_espresso' ), |
|
1909 | + __('HTML editor', 'event_espresso'), |
|
1910 | 1910 | |
1911 | 1911 | // Reference: packages/rich-text-editor/src/rte-old/components/toolbarButtons/WPMedia.tsx:68 |
1912 | - __( 'Add Media', 'event_espresso' ), |
|
1912 | + __('Add Media', 'event_espresso'), |
|
1913 | 1913 | |
1914 | 1914 | // Reference: packages/tpc/src/buttons/AddPriceModifierButton.tsx:16 |
1915 | - __( 'add new price modifier after this row', 'event_espresso' ), |
|
1915 | + __('add new price modifier after this row', 'event_espresso'), |
|
1916 | 1916 | |
1917 | 1917 | // Reference: packages/tpc/src/buttons/DeleteAllPricesButton.tsx:14 |
1918 | - __( 'Delete all prices', 'event_espresso' ), |
|
1918 | + __('Delete all prices', 'event_espresso'), |
|
1919 | 1919 | |
1920 | 1920 | // Reference: packages/tpc/src/buttons/DeleteAllPricesButton.tsx:27 |
1921 | - __( 'Are you sure you want to delete all of this ticket\'s prices and make it free? This action is permanent and can not be undone.', 'event_espresso' ), |
|
1921 | + __('Are you sure you want to delete all of this ticket\'s prices and make it free? This action is permanent and can not be undone.', 'event_espresso'), |
|
1922 | 1922 | |
1923 | 1923 | // Reference: packages/tpc/src/buttons/DeleteAllPricesButton.tsx:31 |
1924 | - __( 'Delete all prices?', 'event_espresso' ), |
|
1924 | + __('Delete all prices?', 'event_espresso'), |
|
1925 | 1925 | |
1926 | 1926 | // Reference: packages/tpc/src/buttons/DeletePriceModifierButton.tsx:12 |
1927 | - __( 'delete price modifier', 'event_espresso' ), |
|
1927 | + __('delete price modifier', 'event_espresso'), |
|
1928 | 1928 | |
1929 | 1929 | // Reference: packages/tpc/src/buttons/ReverseCalculateButton.tsx:14 |
1930 | - __( 'Ticket base price is being reverse calculated from bottom to top starting with the ticket total. Entering a new ticket total will reverse calculate the ticket base price after applying all price modifiers in reverse. Click to turn off reverse calculations', 'event_espresso' ), |
|
1930 | + __('Ticket base price is being reverse calculated from bottom to top starting with the ticket total. Entering a new ticket total will reverse calculate the ticket base price after applying all price modifiers in reverse. Click to turn off reverse calculations', 'event_espresso'), |
|
1931 | 1931 | |
1932 | 1932 | // Reference: packages/tpc/src/buttons/ReverseCalculateButton.tsx:17 |
1933 | - __( 'Ticket total is being calculated normally from top to bottom starting from the base price. Entering a new ticket base price will recalculate the ticket total after applying all price modifiers. Click to turn on reverse calculations', 'event_espresso' ), |
|
1933 | + __('Ticket total is being calculated normally from top to bottom starting from the base price. Entering a new ticket base price will recalculate the ticket total after applying all price modifiers. Click to turn on reverse calculations', 'event_espresso'), |
|
1934 | 1934 | |
1935 | 1935 | // Reference: packages/tpc/src/buttons/ReverseCalculateButton.tsx:21 |
1936 | - __( 'Disable reverse calculate', 'event_espresso' ), |
|
1936 | + __('Disable reverse calculate', 'event_espresso'), |
|
1937 | 1937 | |
1938 | 1938 | // Reference: packages/tpc/src/buttons/ReverseCalculateButton.tsx:21 |
1939 | - __( 'Enable reverse calculate', 'event_espresso' ), |
|
1939 | + __('Enable reverse calculate', 'event_espresso'), |
|
1940 | 1940 | |
1941 | 1941 | // Reference: packages/tpc/src/buttons/TicketPriceCalculatorButton.tsx:28 |
1942 | - __( 'ticket price calculator', 'event_espresso' ), |
|
1942 | + __('ticket price calculator', 'event_espresso'), |
|
1943 | 1943 | |
1944 | 1944 | // Reference: packages/tpc/src/buttons/taxes/AddDefaultTaxesButton.tsx:9 |
1945 | - __( 'Add default taxes', 'event_espresso' ), |
|
1945 | + __('Add default taxes', 'event_espresso'), |
|
1946 | 1946 | |
1947 | 1947 | // Reference: packages/tpc/src/buttons/taxes/RemoveTaxesButton.tsx:10 |
1948 | - __( 'Are you sure you want to remove all of this ticket\'s taxes?', 'event_espresso' ), |
|
1948 | + __('Are you sure you want to remove all of this ticket\'s taxes?', 'event_espresso'), |
|
1949 | 1949 | |
1950 | 1950 | // Reference: packages/tpc/src/buttons/taxes/RemoveTaxesButton.tsx:14 |
1951 | - __( 'Remove all taxes?', 'event_espresso' ), |
|
1951 | + __('Remove all taxes?', 'event_espresso'), |
|
1952 | 1952 | |
1953 | 1953 | // Reference: packages/tpc/src/buttons/taxes/RemoveTaxesButton.tsx:7 |
1954 | - __( 'Remove taxes', 'event_espresso' ), |
|
1954 | + __('Remove taxes', 'event_espresso'), |
|
1955 | 1955 | |
1956 | 1956 | // Reference: packages/tpc/src/components/AddDefaultPricesButton.tsx:9 |
1957 | - __( 'Add default prices', 'event_espresso' ), |
|
1957 | + __('Add default prices', 'event_espresso'), |
|
1958 | 1958 | |
1959 | 1959 | // Reference: packages/tpc/src/components/DefaultPricesInfo.tsx:29 |
1960 | - __( 'Modify default prices.', 'event_espresso' ), |
|
1960 | + __('Modify default prices.', 'event_espresso'), |
|
1961 | 1961 | |
1962 | 1962 | // Reference: packages/tpc/src/components/DefaultTaxesInfo.tsx:29 |
1963 | - __( 'New default taxes are available. Click the - Add default taxes - button to add them now.', 'event_espresso' ), |
|
1963 | + __('New default taxes are available. Click the - Add default taxes - button to add them now.', 'event_espresso'), |
|
1964 | 1964 | |
1965 | 1965 | // Reference: packages/tpc/src/components/LockedTicketsBanner.tsx:12 |
1966 | 1966 | // Reference: packages/tpc/src/hooks/useLockedTicketAction.ts:74 |
1967 | - __( 'Price editing is disabled!', 'event_espresso' ), |
|
1967 | + __('Price editing is disabled!', 'event_espresso'), |
|
1968 | 1968 | |
1969 | 1969 | // Reference: packages/tpc/src/components/NoPriceTypesBanner.tsx:12 |
1970 | - __( 'One or more price types are missing. Maybe they were placed in the trash?', 'event_espresso' ), |
|
1970 | + __('One or more price types are missing. Maybe they were placed in the trash?', 'event_espresso'), |
|
1971 | 1971 | |
1972 | 1972 | // Reference: packages/tpc/src/components/NoPriceTypesBanner.tsx:17 |
1973 | 1973 | /* translators: %s link to price types admin */ |
1974 | - __( 'Go to the%sto restore (untrash) your price types and/or create some new ones.', 'event_espresso' ), |
|
1974 | + __('Go to the%sto restore (untrash) your price types and/or create some new ones.', 'event_espresso'), |
|
1975 | 1975 | |
1976 | 1976 | // Reference: packages/tpc/src/components/NoPriceTypesBanner.tsx:18 |
1977 | - __( 'price types admin page', 'event_espresso' ), |
|
1977 | + __('price types admin page', 'event_espresso'), |
|
1978 | 1978 | |
1979 | 1979 | // Reference: packages/tpc/src/components/NoPriceTypesBanner.tsx:26 |
1980 | - __( 'Missing Price Types!', 'event_espresso' ), |
|
1980 | + __('Missing Price Types!', 'event_espresso'), |
|
1981 | 1981 | |
1982 | 1982 | // Reference: packages/tpc/src/components/NoPricesBanner.tsx:14 |
1983 | - __( 'This Ticket is Currently Free', 'event_espresso' ), |
|
1983 | + __('This Ticket is Currently Free', 'event_espresso'), |
|
1984 | 1984 | |
1985 | 1985 | // Reference: packages/tpc/src/components/NoPricesBanner.tsx:21 |
1986 | 1986 | /* translators: %s default prices */ |
1987 | - __( 'Click the button below to load your %s into the calculator.', 'event_espresso' ), |
|
1987 | + __('Click the button below to load your %s into the calculator.', 'event_espresso'), |
|
1988 | 1988 | |
1989 | 1989 | // Reference: packages/tpc/src/components/NoPricesBanner.tsx:22 |
1990 | - __( 'default prices', 'event_espresso' ), |
|
1990 | + __('default prices', 'event_espresso'), |
|
1991 | 1991 | |
1992 | 1992 | // Reference: packages/tpc/src/components/NoPricesBanner.tsx:29 |
1993 | - __( 'Additional ticket price modifiers can be added or removed.', 'event_espresso' ), |
|
1993 | + __('Additional ticket price modifiers can be added or removed.', 'event_espresso'), |
|
1994 | 1994 | |
1995 | 1995 | // Reference: packages/tpc/src/components/NoPricesBanner.tsx:31 |
1996 | - __( 'Click the save button below to assign which dates this ticket will be available for purchase on.', 'event_espresso' ), |
|
1996 | + __('Click the save button below to assign which dates this ticket will be available for purchase on.', 'event_espresso'), |
|
1997 | 1997 | |
1998 | 1998 | // Reference: packages/tpc/src/components/TicketPriceCalculatorModal.tsx:22 |
1999 | 1999 | // Reference: packages/ui-components/src/Confirm/ConfirmClose.tsx:7 |
2000 | 2000 | // Reference: packages/ui-components/src/Confirm/useConfirmWithButton.tsx:10 |
2001 | 2001 | // Reference: packages/ui-components/src/Confirm/useConfirmationDialog.tsx:52 |
2002 | - __( 'Changes will be lost if you proceed.', 'event_espresso' ), |
|
2002 | + __('Changes will be lost if you proceed.', 'event_espresso'), |
|
2003 | 2003 | |
2004 | 2004 | // Reference: packages/tpc/src/components/TicketPriceCalculatorModal.tsx:33 |
2005 | 2005 | /* translators: %s ticket name */ |
2006 | - __( 'Price Calculator for Ticket: %s', 'event_espresso' ), |
|
2006 | + __('Price Calculator for Ticket: %s', 'event_espresso'), |
|
2007 | 2007 | |
2008 | 2008 | // Reference: packages/tpc/src/components/price/input/Description.tsx:15 |
2009 | - __( 'price description', 'event_espresso' ), |
|
2009 | + __('price description', 'event_espresso'), |
|
2010 | 2010 | |
2011 | 2011 | // Reference: packages/tpc/src/components/price/input/Description.tsx:18 |
2012 | - __( 'description…', 'event_espresso' ), |
|
2012 | + __('description…', 'event_espresso'), |
|
2013 | 2013 | |
2014 | 2014 | // Reference: packages/tpc/src/components/price/input/ID.tsx:7 |
2015 | - __( 'price id', 'event_espresso' ), |
|
2015 | + __('price id', 'event_espresso'), |
|
2016 | 2016 | |
2017 | 2017 | // Reference: packages/tpc/src/components/price/input/Name.tsx:15 |
2018 | - __( 'price name', 'event_espresso' ), |
|
2018 | + __('price name', 'event_espresso'), |
|
2019 | 2019 | |
2020 | 2020 | // Reference: packages/tpc/src/components/price/input/Name.tsx:18 |
2021 | - __( 'label…', 'event_espresso' ), |
|
2021 | + __('label…', 'event_espresso'), |
|
2022 | 2022 | |
2023 | 2023 | // Reference: packages/tpc/src/components/price/input/Order.tsx:21 |
2024 | - __( 'price order', 'event_espresso' ), |
|
2024 | + __('price order', 'event_espresso'), |
|
2025 | 2025 | |
2026 | 2026 | // Reference: packages/tpc/src/components/price/input/amount/Amount.tsx:85 |
2027 | - __( 'amount', 'event_espresso' ), |
|
2027 | + __('amount', 'event_espresso'), |
|
2028 | 2028 | |
2029 | 2029 | // Reference: packages/tpc/src/components/price/input/amount/Amount.tsx:89 |
2030 | - __( 'amount…', 'event_espresso' ), |
|
2030 | + __('amount…', 'event_espresso'), |
|
2031 | 2031 | |
2032 | 2032 | // Reference: packages/tpc/src/components/table/useFooterRowGenerator.tsx:50 |
2033 | - __( 'Total', 'event_espresso' ), |
|
2033 | + __('Total', 'event_espresso'), |
|
2034 | 2034 | |
2035 | 2035 | // Reference: packages/tpc/src/components/table/useFooterRowGenerator.tsx:59 |
2036 | - __( 'ticket total', 'event_espresso' ), |
|
2036 | + __('ticket total', 'event_espresso'), |
|
2037 | 2037 | |
2038 | 2038 | // Reference: packages/tpc/src/components/table/useHeaderRowGenerator.ts:29 |
2039 | - __( 'Order', 'event_espresso' ), |
|
2039 | + __('Order', 'event_espresso'), |
|
2040 | 2040 | |
2041 | 2041 | // Reference: packages/tpc/src/components/table/useHeaderRowGenerator.ts:35 |
2042 | - __( 'Price Type', 'event_espresso' ), |
|
2042 | + __('Price Type', 'event_espresso'), |
|
2043 | 2043 | |
2044 | 2044 | // Reference: packages/tpc/src/components/table/useHeaderRowGenerator.ts:41 |
2045 | - __( 'Label', 'event_espresso' ), |
|
2045 | + __('Label', 'event_espresso'), |
|
2046 | 2046 | |
2047 | 2047 | // Reference: packages/tpc/src/components/table/useHeaderRowGenerator.ts:53 |
2048 | - __( 'Amount', 'event_espresso' ), |
|
2048 | + __('Amount', 'event_espresso'), |
|
2049 | 2049 | |
2050 | 2050 | // Reference: packages/tpc/src/hooks/useLockedTicketAction.ts:22 |
2051 | - __( 'Copy ticket', 'event_espresso' ), |
|
2051 | + __('Copy ticket', 'event_espresso'), |
|
2052 | 2052 | |
2053 | 2053 | // Reference: packages/tpc/src/hooks/useLockedTicketAction.ts:26 |
2054 | - __( 'Copy and archive this ticket', 'event_espresso' ), |
|
2054 | + __('Copy and archive this ticket', 'event_espresso'), |
|
2055 | 2055 | |
2056 | 2056 | // Reference: packages/tpc/src/hooks/useLockedTicketAction.ts:29 |
2057 | - __( 'OK', 'event_espresso' ), |
|
2057 | + __('OK', 'event_espresso'), |
|
2058 | 2058 | |
2059 | 2059 | // Reference: packages/tpc/src/utils/constants.ts:8 |
2060 | - __( 'Ticket price modifications are blocked for Tickets that have already been sold to registrants, because doing so would negatively affect internal accounting for the event. If you still need to modify ticket prices, then create a copy of those tickets, edit the prices for the new tickets, and then trash the old tickets.', 'event_espresso' ), |
|
2060 | + __('Ticket price modifications are blocked for Tickets that have already been sold to registrants, because doing so would negatively affect internal accounting for the event. If you still need to modify ticket prices, then create a copy of those tickets, edit the prices for the new tickets, and then trash the old tickets.', 'event_espresso'), |
|
2061 | 2061 | |
2062 | 2062 | // Reference: packages/ui-components/src/ActiveFilters/ActiveFilters.tsx:8 |
2063 | - __( 'active filters:', 'event_espresso' ), |
|
2063 | + __('active filters:', 'event_espresso'), |
|
2064 | 2064 | |
2065 | 2065 | // Reference: packages/ui-components/src/ActiveFilters/FilterTag/index.tsx:15 |
2066 | 2066 | /* translators: %s filter name */ |
2067 | - __( 'remove filter - %s', 'event_espresso' ), |
|
2067 | + __('remove filter - %s', 'event_espresso'), |
|
2068 | 2068 | |
2069 | 2069 | // Reference: packages/ui-components/src/Address/Address.tsx:105 |
2070 | - __( 'Country:', 'event_espresso' ), |
|
2070 | + __('Country:', 'event_espresso'), |
|
2071 | 2071 | |
2072 | 2072 | // Reference: packages/ui-components/src/Address/Address.tsx:113 |
2073 | - __( 'Zip:', 'event_espresso' ), |
|
2073 | + __('Zip:', 'event_espresso'), |
|
2074 | 2074 | |
2075 | 2075 | // Reference: packages/ui-components/src/Address/Address.tsx:81 |
2076 | - __( 'Address:', 'event_espresso' ), |
|
2076 | + __('Address:', 'event_espresso'), |
|
2077 | 2077 | |
2078 | 2078 | // Reference: packages/ui-components/src/Address/Address.tsx:89 |
2079 | - __( 'City:', 'event_espresso' ), |
|
2079 | + __('City:', 'event_espresso'), |
|
2080 | 2080 | |
2081 | 2081 | // Reference: packages/ui-components/src/Address/Address.tsx:97 |
2082 | - __( 'State:', 'event_espresso' ), |
|
2082 | + __('State:', 'event_espresso'), |
|
2083 | 2083 | |
2084 | 2084 | // Reference: packages/ui-components/src/CalendarDateRange/CalendarDateRange.tsx:37 |
2085 | - __( 'to', 'event_espresso' ), |
|
2085 | + __('to', 'event_espresso'), |
|
2086 | 2086 | |
2087 | 2087 | // Reference: packages/ui-components/src/CalendarPageDate/CalendarPageDate.tsx:54 |
2088 | - __( 'TO', 'event_espresso' ), |
|
2088 | + __('TO', 'event_espresso'), |
|
2089 | 2089 | |
2090 | 2090 | // Reference: packages/ui-components/src/ColorPicker/ColorPicker.tsx:60 |
2091 | - __( 'Custom color', 'event_espresso' ), |
|
2091 | + __('Custom color', 'event_espresso'), |
|
2092 | 2092 | |
2093 | 2093 | // Reference: packages/ui-components/src/ColorPicker/Swatch.tsx:23 |
2094 | 2094 | /* translators: color name */ |
2095 | - __( 'Color: %s', 'event_espresso' ), |
|
2095 | + __('Color: %s', 'event_espresso'), |
|
2096 | 2096 | |
2097 | 2097 | // Reference: packages/ui-components/src/ColorPicker/constants.ts:13 |
2098 | - __( 'Cyan bluish gray', 'event_espresso' ), |
|
2098 | + __('Cyan bluish gray', 'event_espresso'), |
|
2099 | 2099 | |
2100 | 2100 | // Reference: packages/ui-components/src/ColorPicker/constants.ts:17 |
2101 | - __( 'White', 'event_espresso' ), |
|
2101 | + __('White', 'event_espresso'), |
|
2102 | 2102 | |
2103 | 2103 | // Reference: packages/ui-components/src/ColorPicker/constants.ts:21 |
2104 | - __( 'Pale pink', 'event_espresso' ), |
|
2104 | + __('Pale pink', 'event_espresso'), |
|
2105 | 2105 | |
2106 | 2106 | // Reference: packages/ui-components/src/ColorPicker/constants.ts:25 |
2107 | - __( 'Vivid red', 'event_espresso' ), |
|
2107 | + __('Vivid red', 'event_espresso'), |
|
2108 | 2108 | |
2109 | 2109 | // Reference: packages/ui-components/src/ColorPicker/constants.ts:29 |
2110 | - __( 'Luminous vivid orange', 'event_espresso' ), |
|
2110 | + __('Luminous vivid orange', 'event_espresso'), |
|
2111 | 2111 | |
2112 | 2112 | // Reference: packages/ui-components/src/ColorPicker/constants.ts:33 |
2113 | - __( 'Luminous vivid amber', 'event_espresso' ), |
|
2113 | + __('Luminous vivid amber', 'event_espresso'), |
|
2114 | 2114 | |
2115 | 2115 | // Reference: packages/ui-components/src/ColorPicker/constants.ts:37 |
2116 | - __( 'Light green cyan', 'event_espresso' ), |
|
2116 | + __('Light green cyan', 'event_espresso'), |
|
2117 | 2117 | |
2118 | 2118 | // Reference: packages/ui-components/src/ColorPicker/constants.ts:41 |
2119 | - __( 'Vivid green cyan', 'event_espresso' ), |
|
2119 | + __('Vivid green cyan', 'event_espresso'), |
|
2120 | 2120 | |
2121 | 2121 | // Reference: packages/ui-components/src/ColorPicker/constants.ts:45 |
2122 | - __( 'Pale cyan blue', 'event_espresso' ), |
|
2122 | + __('Pale cyan blue', 'event_espresso'), |
|
2123 | 2123 | |
2124 | 2124 | // Reference: packages/ui-components/src/ColorPicker/constants.ts:49 |
2125 | - __( 'Vivid cyan blue', 'event_espresso' ), |
|
2125 | + __('Vivid cyan blue', 'event_espresso'), |
|
2126 | 2126 | |
2127 | 2127 | // Reference: packages/ui-components/src/ColorPicker/constants.ts:53 |
2128 | - __( 'Vivid purple', 'event_espresso' ), |
|
2128 | + __('Vivid purple', 'event_espresso'), |
|
2129 | 2129 | |
2130 | 2130 | // Reference: packages/ui-components/src/ColorPicker/constants.ts:9 |
2131 | - __( 'Black', 'event_espresso' ), |
|
2131 | + __('Black', 'event_espresso'), |
|
2132 | 2132 | |
2133 | 2133 | // Reference: packages/ui-components/src/Confirm/ConfirmClose.tsx:8 |
2134 | 2134 | // Reference: packages/ui-components/src/Modal/ModalWithAlert.tsx:24 |
2135 | - __( 'Are you sure you want to close this?', 'event_espresso' ), |
|
2135 | + __('Are you sure you want to close this?', 'event_espresso'), |
|
2136 | 2136 | |
2137 | 2137 | // Reference: packages/ui-components/src/Confirm/ConfirmClose.tsx:9 |
2138 | 2138 | // Reference: packages/ui-components/src/Modal/ModalWithAlert.tsx:25 |
2139 | - __( 'Yes, discard changes', 'event_espresso' ), |
|
2139 | + __('Yes, discard changes', 'event_espresso'), |
|
2140 | 2140 | |
2141 | 2141 | // Reference: packages/ui-components/src/Confirm/ConfirmDelete.tsx:7 |
2142 | - __( 'Are you sure you want to delete this?', 'event_espresso' ), |
|
2142 | + __('Are you sure you want to delete this?', 'event_espresso'), |
|
2143 | 2143 | |
2144 | 2144 | // Reference: packages/ui-components/src/Confirm/useConfirmWithButton.tsx:11 |
2145 | - __( 'Please confirm this action.', 'event_espresso' ), |
|
2145 | + __('Please confirm this action.', 'event_espresso'), |
|
2146 | 2146 | |
2147 | 2147 | // Reference: packages/ui-components/src/Confirm/useConfirmationDialog.tsx:39 |
2148 | - __( 'cancel', 'event_espresso' ), |
|
2148 | + __('cancel', 'event_espresso'), |
|
2149 | 2149 | |
2150 | 2150 | // Reference: packages/ui-components/src/Confirm/useConfirmationDialog.tsx:40 |
2151 | - __( 'confirm', 'event_espresso' ), |
|
2151 | + __('confirm', 'event_espresso'), |
|
2152 | 2152 | |
2153 | 2153 | // Reference: packages/ui-components/src/CurrencyDisplay/CurrencyDisplay.tsx:34 |
2154 | - __( 'free', 'event_espresso' ), |
|
2154 | + __('free', 'event_espresso'), |
|
2155 | 2155 | |
2156 | 2156 | // Reference: packages/ui-components/src/DateTimeRangePicker/DateTimeRangePicker.tsx:117 |
2157 | 2157 | // Reference: packages/ui-components/src/Popover/PopoverForm/PopoverForm.tsx:44 |
2158 | - __( 'save', 'event_espresso' ), |
|
2158 | + __('save', 'event_espresso'), |
|
2159 | 2159 | |
2160 | 2160 | // Reference: packages/ui-components/src/DebugInfo/DebugInfo.tsx:36 |
2161 | - __( 'Hide Debug Info', 'event_espresso' ), |
|
2161 | + __('Hide Debug Info', 'event_espresso'), |
|
2162 | 2162 | |
2163 | 2163 | // Reference: packages/ui-components/src/DebugInfo/DebugInfo.tsx:36 |
2164 | - __( 'Show Debug Info', 'event_espresso' ), |
|
2164 | + __('Show Debug Info', 'event_espresso'), |
|
2165 | 2165 | |
2166 | 2166 | // Reference: packages/ui-components/src/EditDateRangeButton/EditDateRangeButton.tsx:49 |
2167 | - __( 'Edit Start and End Dates and Times', 'event_espresso' ), |
|
2167 | + __('Edit Start and End Dates and Times', 'event_espresso'), |
|
2168 | 2168 | |
2169 | 2169 | // Reference: packages/ui-components/src/EntityActionsMenu/entityMenuItems/CopyEntity.tsx:8 |
2170 | - __( 'copy', 'event_espresso' ), |
|
2170 | + __('copy', 'event_espresso'), |
|
2171 | 2171 | |
2172 | 2172 | // Reference: packages/ui-components/src/EntityActionsMenu/entityMenuItems/EditEntity.tsx:8 |
2173 | - __( 'edit', 'event_espresso' ), |
|
2173 | + __('edit', 'event_espresso'), |
|
2174 | 2174 | |
2175 | 2175 | // Reference: packages/ui-components/src/EntityActionsMenu/entityMenuItems/TrashEntity.tsx:8 |
2176 | - __( 'trash', 'event_espresso' ), |
|
2176 | + __('trash', 'event_espresso'), |
|
2177 | 2177 | |
2178 | 2178 | // Reference: packages/ui-components/src/EntityActionsMenu/entityMenuItems/Untrash.tsx:8 |
2179 | - __( 'untrash', 'event_espresso' ), |
|
2179 | + __('untrash', 'event_espresso'), |
|
2180 | 2180 | |
2181 | 2181 | // Reference: packages/ui-components/src/EntityList/EntityList.tsx:23 |
2182 | - __( 'OOPS!', 'event_espresso' ), |
|
2182 | + __('OOPS!', 'event_espresso'), |
|
2183 | 2183 | |
2184 | 2184 | // Reference: packages/ui-components/src/EntityList/EntityList.tsx:23 |
2185 | - __( 'Error Loading Entites List', 'event_espresso' ), |
|
2185 | + __('Error Loading Entites List', 'event_espresso'), |
|
2186 | 2186 | |
2187 | 2187 | // Reference: packages/ui-components/src/EntityList/RegistrationsLink/index.tsx:12 |
2188 | - __( 'click to open the registrations admin page in a new tab or window', 'event_espresso' ), |
|
2188 | + __('click to open the registrations admin page in a new tab or window', 'event_espresso'), |
|
2189 | 2189 | |
2190 | 2190 | // Reference: packages/ui-components/src/EntityList/filterBar/buttons/CardViewFilterButton.tsx:22 |
2191 | - __( 'card view', 'event_espresso' ), |
|
2191 | + __('card view', 'event_espresso'), |
|
2192 | 2192 | |
2193 | 2193 | // Reference: packages/ui-components/src/EntityList/filterBar/buttons/TableViewFilterButton.tsx:21 |
2194 | - __( 'table view', 'event_espresso' ), |
|
2194 | + __('table view', 'event_espresso'), |
|
2195 | 2195 | |
2196 | 2196 | // Reference: packages/ui-components/src/EntityList/filterBar/buttons/ToggleBulkActionsButton.tsx:8 |
2197 | - __( 'hide bulk actions', 'event_espresso' ), |
|
2197 | + __('hide bulk actions', 'event_espresso'), |
|
2198 | 2198 | |
2199 | 2199 | // Reference: packages/ui-components/src/EntityList/filterBar/buttons/ToggleBulkActionsButton.tsx:8 |
2200 | - __( 'show bulk actions', 'event_espresso' ), |
|
2200 | + __('show bulk actions', 'event_espresso'), |
|
2201 | 2201 | |
2202 | 2202 | // Reference: packages/ui-components/src/EntityList/filterBar/buttons/ToggleFiltersButton.tsx:23 |
2203 | - __( 'filters', 'event_espresso' ), |
|
2203 | + __('filters', 'event_espresso'), |
|
2204 | 2204 | |
2205 | 2205 | // Reference: packages/ui-components/src/Legend/ToggleLegendButton.tsx:38 |
2206 | - __( 'legend', 'event_espresso' ), |
|
2206 | + __('legend', 'event_espresso'), |
|
2207 | 2207 | |
2208 | 2208 | // Reference: packages/ui-components/src/LoadingNotice/LoadingNotice.tsx:11 |
2209 | - __( 'loading…', 'event_espresso' ), |
|
2209 | + __('loading…', 'event_espresso'), |
|
2210 | 2210 | |
2211 | 2211 | // Reference: packages/ui-components/src/Modal/Modal.tsx:59 |
2212 | - __( 'close modal', 'event_espresso' ), |
|
2212 | + __('close modal', 'event_espresso'), |
|
2213 | 2213 | |
2214 | 2214 | // Reference: packages/ui-components/src/Pagination/ItemRender.tsx:10 |
2215 | - __( 'jump to previous', 'event_espresso' ), |
|
2215 | + __('jump to previous', 'event_espresso'), |
|
2216 | 2216 | |
2217 | 2217 | // Reference: packages/ui-components/src/Pagination/ItemRender.tsx:11 |
2218 | - __( 'jump to next', 'event_espresso' ), |
|
2218 | + __('jump to next', 'event_espresso'), |
|
2219 | 2219 | |
2220 | 2220 | // Reference: packages/ui-components/src/Pagination/ItemRender.tsx:12 |
2221 | - __( 'page', 'event_espresso' ), |
|
2221 | + __('page', 'event_espresso'), |
|
2222 | 2222 | |
2223 | 2223 | // Reference: packages/ui-components/src/Pagination/ItemRender.tsx:8 |
2224 | - __( 'previous', 'event_espresso' ), |
|
2224 | + __('previous', 'event_espresso'), |
|
2225 | 2225 | |
2226 | 2226 | // Reference: packages/ui-components/src/Pagination/ItemRender.tsx:9 |
2227 | - __( 'next', 'event_espresso' ), |
|
2227 | + __('next', 'event_espresso'), |
|
2228 | 2228 | |
2229 | 2229 | // Reference: packages/ui-components/src/Pagination/PerPage.tsx:45 |
2230 | 2230 | /* translators: %1$d is first item #, %2$d is last item #, %3$d is total items, ex: 20-30 of 100 items */ |
2231 | - __( '%1$d-%2$d of %3$d items', 'event_espresso' ), |
|
2231 | + __('%1$d-%2$d of %3$d items', 'event_espresso'), |
|
2232 | 2232 | |
2233 | 2233 | // Reference: packages/ui-components/src/Pagination/PerPage.tsx:54 |
2234 | - __( 'items per page', 'event_espresso' ), |
|
2234 | + __('items per page', 'event_espresso'), |
|
2235 | 2235 | |
2236 | 2236 | // Reference: packages/ui-components/src/Pagination/constants.ts:11 |
2237 | 2237 | /* translators: %s is per page value */ |
2238 | - __( '%s / page', 'event_espresso' ), |
|
2238 | + __('%s / page', 'event_espresso'), |
|
2239 | 2239 | |
2240 | 2240 | // Reference: packages/ui-components/src/Pagination/constants.ts:12 |
2241 | - __( 'show all', 'event_espresso' ), |
|
2241 | + __('show all', 'event_espresso'), |
|
2242 | 2242 | |
2243 | 2243 | // Reference: packages/ui-components/src/Pagination/constants.ts:15 |
2244 | - __( 'Next Page', 'event_espresso' ), |
|
2244 | + __('Next Page', 'event_espresso'), |
|
2245 | 2245 | |
2246 | 2246 | // Reference: packages/ui-components/src/Pagination/constants.ts:16 |
2247 | - __( 'Previous Page', 'event_espresso' ), |
|
2247 | + __('Previous Page', 'event_espresso'), |
|
2248 | 2248 | |
2249 | 2249 | // Reference: packages/ui-components/src/PercentSign/index.tsx:10 |
2250 | - __( '%', 'event_espresso' ), |
|
2250 | + __('%', 'event_espresso'), |
|
2251 | 2251 | |
2252 | 2252 | // Reference: packages/ui-components/src/SimpleEntityList/EntityOptionsRow/index.tsx:31 |
2253 | 2253 | /* translators: entity type to select */ |
2254 | - __( 'Select an existing %s to use as a template.', 'event_espresso' ), |
|
2254 | + __('Select an existing %s to use as a template.', 'event_espresso'), |
|
2255 | 2255 | |
2256 | 2256 | // Reference: packages/ui-components/src/SimpleEntityList/EntityOptionsRow/index.tsx:38 |
2257 | - __( 'or', 'event_espresso' ), |
|
2257 | + __('or', 'event_espresso'), |
|
2258 | 2258 | |
2259 | 2259 | // Reference: packages/ui-components/src/SimpleEntityList/EntityOptionsRow/index.tsx:43 |
2260 | 2260 | /* translators: entity type to add */ |
2261 | - __( 'Add a new %s and insert details manually', 'event_espresso' ), |
|
2261 | + __('Add a new %s and insert details manually', 'event_espresso'), |
|
2262 | 2262 | |
2263 | 2263 | // Reference: packages/ui-components/src/SimpleEntityList/EntityOptionsRow/index.tsx:48 |
2264 | - __( 'Add New', 'event_espresso' ), |
|
2264 | + __('Add New', 'event_espresso'), |
|
2265 | 2265 | |
2266 | 2266 | // Reference: packages/ui-components/src/Stepper/buttons/Next.tsx:8 |
2267 | - __( 'Next', 'event_espresso' ), |
|
2267 | + __('Next', 'event_espresso'), |
|
2268 | 2268 | |
2269 | 2269 | // Reference: packages/ui-components/src/Stepper/buttons/Previous.tsx:8 |
2270 | - __( 'Previous', 'event_espresso' ), |
|
2270 | + __('Previous', 'event_espresso'), |
|
2271 | 2271 | |
2272 | 2272 | // Reference: packages/ui-components/src/Steps/Steps.tsx:31 |
2273 | - __( 'Steps', 'event_espresso' ), |
|
2273 | + __('Steps', 'event_espresso'), |
|
2274 | 2274 | |
2275 | 2275 | // Reference: packages/ui-components/src/TabbableText/index.tsx:21 |
2276 | - __( 'click to edit…', 'event_espresso' ), |
|
2276 | + __('click to edit…', 'event_espresso'), |
|
2277 | 2277 | |
2278 | 2278 | // Reference: packages/ui-components/src/TimezoneTimeInfo/Content.tsx:14 |
2279 | - __( 'The Website\'s Time Zone', 'event_espresso' ), |
|
2279 | + __('The Website\'s Time Zone', 'event_espresso'), |
|
2280 | 2280 | |
2281 | 2281 | // Reference: packages/ui-components/src/TimezoneTimeInfo/Content.tsx:19 |
2282 | - __( 'UTC (Greenwich Mean Time)', 'event_espresso' ), |
|
2282 | + __('UTC (Greenwich Mean Time)', 'event_espresso'), |
|
2283 | 2283 | |
2284 | 2284 | // Reference: packages/ui-components/src/TimezoneTimeInfo/Content.tsx:9 |
2285 | - __( 'Your Local Time Zone', 'event_espresso' ), |
|
2285 | + __('Your Local Time Zone', 'event_espresso'), |
|
2286 | 2286 | |
2287 | 2287 | // Reference: packages/ui-components/src/TimezoneTimeInfo/TimezoneTimeInfo.tsx:25 |
2288 | - __( 'click for timezone information', 'event_espresso' ), |
|
2288 | + __('click for timezone information', 'event_espresso'), |
|
2289 | 2289 | |
2290 | 2290 | // Reference: packages/ui-components/src/TimezoneTimeInfo/TimezoneTimeInfo.tsx:30 |
2291 | - __( 'This Date Converted To:', 'event_espresso' ), |
|
2291 | + __('This Date Converted To:', 'event_espresso'), |
|
2292 | 2292 | |
2293 | 2293 | // Reference: packages/ui-components/src/VenueSelector/VenueSelector.tsx:120 |
2294 | - __( 'Add New Venue', 'event_espresso' ), |
|
2294 | + __('Add New Venue', 'event_espresso'), |
|
2295 | 2295 | |
2296 | 2296 | // Reference: packages/ui-components/src/VenueSelector/VenueSelector.tsx:36 |
2297 | - __( '~ no venue ~', 'event_espresso' ), |
|
2297 | + __('~ no venue ~', 'event_espresso'), |
|
2298 | 2298 | |
2299 | 2299 | // Reference: packages/ui-components/src/VenueSelector/VenueSelector.tsx:43 |
2300 | - __( 'assign venue…', 'event_espresso' ), |
|
2300 | + __('assign venue…', 'event_espresso'), |
|
2301 | 2301 | |
2302 | 2302 | // Reference: packages/ui-components/src/VenueSelector/VenueSelector.tsx:44 |
2303 | - __( 'click to select a venue…', 'event_espresso' ), |
|
2303 | + __('click to select a venue…', 'event_espresso'), |
|
2304 | 2304 | |
2305 | 2305 | // Reference: packages/ui-components/src/bulkEdit/BulkActions.tsx:51 |
2306 | - __( 'select all', 'event_espresso' ), |
|
2306 | + __('select all', 'event_espresso'), |
|
2307 | 2307 | |
2308 | 2308 | // Reference: packages/ui-components/src/bulkEdit/BulkActions.tsx:54 |
2309 | - __( 'apply', 'event_espresso' ) |
|
2309 | + __('apply', 'event_espresso') |
|
2310 | 2310 | ); |
2311 | 2311 | /* THIS IS THE END OF THE GENERATED FILE */ |
@@ -21,68 +21,68 @@ |
||
21 | 21 | */ |
22 | 22 | class TicketSelectorSimple extends TicketSelector |
23 | 23 | { |
24 | - protected EE_Ticket_Selector_Config $ticket_selector_config; |
|
24 | + protected EE_Ticket_Selector_Config $ticket_selector_config; |
|
25 | 25 | |
26 | - protected EE_Ticket $ticket; |
|
26 | + protected EE_Ticket $ticket; |
|
27 | 27 | |
28 | 28 | |
29 | - /** |
|
30 | - * TicketSelectorSimple constructor. |
|
31 | - * |
|
32 | - * @param EE_Ticket_Selector_Config $ticket_selector_config |
|
33 | - * @param EE_Event $event |
|
34 | - * @param EE_Ticket $ticket |
|
35 | - * @param int $max_attendees |
|
36 | - * @param array $template_args |
|
37 | - */ |
|
38 | - public function __construct( |
|
39 | - EE_Ticket_Selector_Config $ticket_selector_config, |
|
40 | - EE_Event $event, |
|
41 | - EE_Ticket $ticket, |
|
42 | - $max_attendees, |
|
43 | - array $template_args |
|
44 | - ) { |
|
45 | - $this->ticket_selector_config = $ticket_selector_config; |
|
46 | - $this->ticket = $ticket; |
|
47 | - parent::__construct( |
|
48 | - $event, |
|
49 | - [$this->ticket], |
|
50 | - $max_attendees, |
|
51 | - $template_args |
|
52 | - ); |
|
53 | - } |
|
29 | + /** |
|
30 | + * TicketSelectorSimple constructor. |
|
31 | + * |
|
32 | + * @param EE_Ticket_Selector_Config $ticket_selector_config |
|
33 | + * @param EE_Event $event |
|
34 | + * @param EE_Ticket $ticket |
|
35 | + * @param int $max_attendees |
|
36 | + * @param array $template_args |
|
37 | + */ |
|
38 | + public function __construct( |
|
39 | + EE_Ticket_Selector_Config $ticket_selector_config, |
|
40 | + EE_Event $event, |
|
41 | + EE_Ticket $ticket, |
|
42 | + $max_attendees, |
|
43 | + array $template_args |
|
44 | + ) { |
|
45 | + $this->ticket_selector_config = $ticket_selector_config; |
|
46 | + $this->ticket = $ticket; |
|
47 | + parent::__construct( |
|
48 | + $event, |
|
49 | + [$this->ticket], |
|
50 | + $max_attendees, |
|
51 | + $template_args |
|
52 | + ); |
|
53 | + } |
|
54 | 54 | |
55 | 55 | |
56 | - /** |
|
57 | - * sets any and all template args that are required for this Ticket Selector |
|
58 | - * |
|
59 | - * @return void |
|
60 | - * @throws UnexpectedEntityException |
|
61 | - * @throws EE_Error |
|
62 | - * @throws ReflectionException |
|
63 | - */ |
|
64 | - protected function addTemplateArgs() |
|
65 | - { |
|
66 | - $this->ticket_rows = 1; |
|
67 | - unset($this->template_args['tickets']); |
|
68 | - $this->template_args['ticket'] = $this->ticket; |
|
69 | - $ticket_selector_row = new TicketSelectorRowSimple( |
|
70 | - $this->ticket, |
|
71 | - $this->max_attendees, |
|
72 | - $this->template_args['date_format'], |
|
73 | - $this->template_args['event_status'] |
|
74 | - ); |
|
75 | - $this->template_args['TKT_ID'] = $this->ticket->ID(); |
|
76 | - $ticket_selector_row->setupTicketStatusDisplay(); |
|
77 | - $this->template_args['ticket_status_display'] = $ticket_selector_row->getTicketStatusDisplay(); |
|
78 | - if (empty($this->template_args['ticket_status_display'])) { |
|
79 | - add_filter('FHEE__EE_Ticket_Selector__display_ticket_selector_submit', '__return_true'); |
|
80 | - } |
|
81 | - $this->template_args['use_new_form_styles_class'] = $this->ticket_selector_config->useNewFormStyles() |
|
82 | - ? ' tkt-slctr-use-new-form-styles' |
|
83 | - : ''; |
|
84 | - $this->template_args['ticket_description'] = $ticket_selector_row->getTicketDescription(); |
|
85 | - $this->template_args['template_path'] = |
|
86 | - TICKET_SELECTOR_TEMPLATES_PATH . 'simple_ticket_selector.template.php'; |
|
87 | - } |
|
56 | + /** |
|
57 | + * sets any and all template args that are required for this Ticket Selector |
|
58 | + * |
|
59 | + * @return void |
|
60 | + * @throws UnexpectedEntityException |
|
61 | + * @throws EE_Error |
|
62 | + * @throws ReflectionException |
|
63 | + */ |
|
64 | + protected function addTemplateArgs() |
|
65 | + { |
|
66 | + $this->ticket_rows = 1; |
|
67 | + unset($this->template_args['tickets']); |
|
68 | + $this->template_args['ticket'] = $this->ticket; |
|
69 | + $ticket_selector_row = new TicketSelectorRowSimple( |
|
70 | + $this->ticket, |
|
71 | + $this->max_attendees, |
|
72 | + $this->template_args['date_format'], |
|
73 | + $this->template_args['event_status'] |
|
74 | + ); |
|
75 | + $this->template_args['TKT_ID'] = $this->ticket->ID(); |
|
76 | + $ticket_selector_row->setupTicketStatusDisplay(); |
|
77 | + $this->template_args['ticket_status_display'] = $ticket_selector_row->getTicketStatusDisplay(); |
|
78 | + if (empty($this->template_args['ticket_status_display'])) { |
|
79 | + add_filter('FHEE__EE_Ticket_Selector__display_ticket_selector_submit', '__return_true'); |
|
80 | + } |
|
81 | + $this->template_args['use_new_form_styles_class'] = $this->ticket_selector_config->useNewFormStyles() |
|
82 | + ? ' tkt-slctr-use-new-form-styles' |
|
83 | + : ''; |
|
84 | + $this->template_args['ticket_description'] = $ticket_selector_row->getTicketDescription(); |
|
85 | + $this->template_args['template_path'] = |
|
86 | + TICKET_SELECTOR_TEMPLATES_PATH . 'simple_ticket_selector.template.php'; |
|
87 | + } |
|
88 | 88 | } |
@@ -83,6 +83,6 @@ |
||
83 | 83 | : ''; |
84 | 84 | $this->template_args['ticket_description'] = $ticket_selector_row->getTicketDescription(); |
85 | 85 | $this->template_args['template_path'] = |
86 | - TICKET_SELECTOR_TEMPLATES_PATH . 'simple_ticket_selector.template.php'; |
|
86 | + TICKET_SELECTOR_TEMPLATES_PATH.'simple_ticket_selector.template.php'; |
|
87 | 87 | } |
88 | 88 | } |
@@ -35,12 +35,12 @@ discard block |
||
35 | 35 | <tr> |
36 | 36 | <th id="details-<?php esc_attr_e($EVT_ID); ?>" scope="col" class="ee-ticket-selector-ticket-details-th"> |
37 | 37 | <?php |
38 | - echo apply_filters( |
|
39 | - 'FHEE__ticket_selector_chart_template__table_header_available_tickets', |
|
40 | - esc_html__('Details', 'event_espresso'), |
|
41 | - $EVT_ID |
|
42 | - ); |
|
43 | - ?> |
|
38 | + echo apply_filters( |
|
39 | + 'FHEE__ticket_selector_chart_template__table_header_available_tickets', |
|
40 | + esc_html__('Details', 'event_espresso'), |
|
41 | + $EVT_ID |
|
42 | + ); |
|
43 | + ?> |
|
44 | 44 | </th> |
45 | 45 | <?php if (apply_filters('FHEE__ticket_selector_chart_template__display_ticket_price_details', true)) { ?> |
46 | 46 | <th id="price-<?php esc_attr_e($EVT_ID); ?>" scope="col" class="ee-ticket-selector-ticket-price-th |
@@ -59,12 +59,12 @@ discard block |
||
59 | 59 | </table> |
60 | 60 | <?php |
61 | 61 | if ($taxable_tickets && apply_filters('FHEE__ticket_selector_chart_template__display_ticket_price_details', true)) { |
62 | - if ($prices_displayed_including_taxes) { |
|
63 | - $ticket_price_includes_taxes = esc_html__('* price includes taxes', 'event_espresso'); |
|
64 | - } else { |
|
65 | - $ticket_price_includes_taxes = esc_html__('* price does not include taxes', 'event_espresso'); |
|
66 | - } |
|
67 | - echo '<p class="small-text lt-grey-text" style="text-align:right; margin: -1em 0 1em;"> |
|
62 | + if ($prices_displayed_including_taxes) { |
|
63 | + $ticket_price_includes_taxes = esc_html__('* price includes taxes', 'event_espresso'); |
|
64 | + } else { |
|
65 | + $ticket_price_includes_taxes = esc_html__('* price does not include taxes', 'event_espresso'); |
|
66 | + } |
|
67 | + echo '<p class="small-text lt-grey-text" style="text-align:right; margin: -1em 0 1em;"> |
|
68 | 68 | ' . $ticket_price_includes_taxes . ' |
69 | 69 | </p>'; |
70 | 70 | } |
@@ -74,12 +74,12 @@ discard block |
||
74 | 74 | |
75 | 75 | <?php |
76 | 76 | if ($max_atndz > 0) { |
77 | - echo apply_filters( |
|
78 | - 'FHEE__ticket_selector_chart_template__maximum_tickets_purchased_footnote', |
|
79 | - esc_html('') |
|
80 | - ); |
|
77 | + echo apply_filters( |
|
78 | + 'FHEE__ticket_selector_chart_template__maximum_tickets_purchased_footnote', |
|
79 | + esc_html('') |
|
80 | + ); |
|
81 | 81 | } |
82 | 82 | if (! apply_filters('FHEE__EE_Ticket_Selector__display_ticket_selector_submit', false)) { |
83 | - add_filter('FHEE__EE_Ticket_Selector__no_ticket_selector_submit', '__return_true'); |
|
83 | + add_filter('FHEE__EE_Ticket_Selector__no_ticket_selector_submit', '__return_true'); |
|
84 | 84 | } |
85 | 85 | do_action('AHEE__ticket_selector_chart__template__after_ticket_selector', $EVT_ID, $event); |
@@ -20,147 +20,147 @@ |
||
20 | 20 | */ |
21 | 21 | class TicketSelectorStandard extends TicketSelector |
22 | 22 | { |
23 | - protected string $date_format; |
|
23 | + protected string $date_format; |
|
24 | 24 | |
25 | - protected string $time_format; |
|
25 | + protected string $time_format; |
|
26 | 26 | |
27 | - protected EE_Ticket_Selector_Config $ticket_selector_config; |
|
27 | + protected EE_Ticket_Selector_Config $ticket_selector_config; |
|
28 | 28 | |
29 | - protected EE_Tax_Config $tax_config; |
|
29 | + protected EE_Tax_Config $tax_config; |
|
30 | 30 | |
31 | 31 | |
32 | - /** |
|
33 | - * TicketSelectorSimple constructor. |
|
34 | - * |
|
35 | - * @param EE_Ticket_Selector_Config $ticket_selector_config |
|
36 | - * @param EE_Tax_Config $tax_config |
|
37 | - * @param EE_Event $event |
|
38 | - * @param EE_Ticket[] $tickets |
|
39 | - * @param int $max_attendees |
|
40 | - * @param array $template_args |
|
41 | - * @param string $date_format |
|
42 | - * @param string $time_format |
|
43 | - */ |
|
44 | - public function __construct( |
|
45 | - EE_Ticket_Selector_Config $ticket_selector_config, |
|
46 | - EE_Tax_Config $tax_config, |
|
47 | - EE_Event $event, |
|
48 | - array $tickets, |
|
49 | - int $max_attendees, |
|
50 | - array $template_args, |
|
51 | - string $date_format = 'Y-m-d', |
|
52 | - string $time_format = 'g:i a' |
|
53 | - ) { |
|
54 | - $this->ticket_selector_config = $ticket_selector_config; |
|
55 | - $this->tax_config = $tax_config; |
|
56 | - $this->date_format = $date_format; |
|
57 | - $this->time_format = $time_format; |
|
58 | - parent::__construct($event, $tickets, $max_attendees, $template_args); |
|
59 | - } |
|
32 | + /** |
|
33 | + * TicketSelectorSimple constructor. |
|
34 | + * |
|
35 | + * @param EE_Ticket_Selector_Config $ticket_selector_config |
|
36 | + * @param EE_Tax_Config $tax_config |
|
37 | + * @param EE_Event $event |
|
38 | + * @param EE_Ticket[] $tickets |
|
39 | + * @param int $max_attendees |
|
40 | + * @param array $template_args |
|
41 | + * @param string $date_format |
|
42 | + * @param string $time_format |
|
43 | + */ |
|
44 | + public function __construct( |
|
45 | + EE_Ticket_Selector_Config $ticket_selector_config, |
|
46 | + EE_Tax_Config $tax_config, |
|
47 | + EE_Event $event, |
|
48 | + array $tickets, |
|
49 | + int $max_attendees, |
|
50 | + array $template_args, |
|
51 | + string $date_format = 'Y-m-d', |
|
52 | + string $time_format = 'g:i a' |
|
53 | + ) { |
|
54 | + $this->ticket_selector_config = $ticket_selector_config; |
|
55 | + $this->tax_config = $tax_config; |
|
56 | + $this->date_format = $date_format; |
|
57 | + $this->time_format = $time_format; |
|
58 | + parent::__construct($event, $tickets, $max_attendees, $template_args); |
|
59 | + } |
|
60 | 60 | |
61 | 61 | |
62 | - /** |
|
63 | - * sets any and all template args that are required for this Ticket Selector |
|
64 | - * |
|
65 | - * @return void |
|
66 | - * @throws EE_Error |
|
67 | - * @throws ReflectionException |
|
68 | - */ |
|
69 | - protected function addTemplateArgs() |
|
70 | - { |
|
71 | - $this->ticket_rows = 0; |
|
72 | - $all_ticket_rows_html = ''; |
|
73 | - $required_ticket_sold_out = false; |
|
74 | - // flag to indicate that at least one taxable ticket has been encountered |
|
75 | - $taxable_tickets = false; |
|
76 | - $datetime_selector = null; |
|
77 | - $this->template_args['datetime_selector'] = ''; |
|
78 | - if ( |
|
79 | - $this->ticket_selector_config->getShowDatetimeSelector() |
|
80 | - !== EE_Ticket_Selector_Config::DO_NOT_SHOW_DATETIME_SELECTOR |
|
81 | - ) { |
|
82 | - $datetime_selector = new DatetimeSelector( |
|
83 | - $this->event, |
|
84 | - $this->tickets, |
|
85 | - $this->ticket_selector_config, |
|
86 | - $this->date_format, |
|
87 | - $this->time_format |
|
88 | - ); |
|
89 | - $this->template_args['datetime_selector'] = $datetime_selector->getDatetimeSelector(); |
|
90 | - } |
|
62 | + /** |
|
63 | + * sets any and all template args that are required for this Ticket Selector |
|
64 | + * |
|
65 | + * @return void |
|
66 | + * @throws EE_Error |
|
67 | + * @throws ReflectionException |
|
68 | + */ |
|
69 | + protected function addTemplateArgs() |
|
70 | + { |
|
71 | + $this->ticket_rows = 0; |
|
72 | + $all_ticket_rows_html = ''; |
|
73 | + $required_ticket_sold_out = false; |
|
74 | + // flag to indicate that at least one taxable ticket has been encountered |
|
75 | + $taxable_tickets = false; |
|
76 | + $datetime_selector = null; |
|
77 | + $this->template_args['datetime_selector'] = ''; |
|
78 | + if ( |
|
79 | + $this->ticket_selector_config->getShowDatetimeSelector() |
|
80 | + !== EE_Ticket_Selector_Config::DO_NOT_SHOW_DATETIME_SELECTOR |
|
81 | + ) { |
|
82 | + $datetime_selector = new DatetimeSelector( |
|
83 | + $this->event, |
|
84 | + $this->tickets, |
|
85 | + $this->ticket_selector_config, |
|
86 | + $this->date_format, |
|
87 | + $this->time_format |
|
88 | + ); |
|
89 | + $this->template_args['datetime_selector'] = $datetime_selector->getDatetimeSelector(); |
|
90 | + } |
|
91 | 91 | |
92 | - $total_tickets = count($this->tickets); |
|
93 | - // loop through tickets |
|
94 | - foreach ($this->tickets as $ticket) { |
|
95 | - if ($ticket instanceof EE_Ticket) { |
|
96 | - $this->ticket_rows++; |
|
97 | - $cols = 2; |
|
98 | - $taxable_tickets = $ticket->taxable() ? true : $taxable_tickets; |
|
99 | - $ticket_selector_row = new TicketSelectorRowStandard( |
|
100 | - new TicketDetails($ticket, $this->ticket_selector_config, $this->template_args), |
|
101 | - $this->tax_config, |
|
102 | - $total_tickets, |
|
103 | - $this->max_attendees, |
|
104 | - $this->ticket_rows, |
|
105 | - $cols, |
|
106 | - $required_ticket_sold_out, |
|
107 | - $this->template_args['event_status'], |
|
108 | - $datetime_selector instanceof DatetimeSelector |
|
109 | - ? $datetime_selector->getTicketDatetimeClasses($ticket) |
|
110 | - : '', |
|
111 | - $this->ticket_selector_config->useNewCheckboxSelector() |
|
112 | - ); |
|
113 | - $ticket_row_html = $ticket_selector_row->getHtml(); |
|
114 | - // check if something was actually returned |
|
115 | - if (! empty($ticket_row_html)) { |
|
116 | - // add any output to the cumulative HTML |
|
117 | - $all_ticket_rows_html .= $ticket_row_html; |
|
118 | - } |
|
119 | - if (empty($ticket_row_html) || ! $ticket_selector_row->isOnSale()) { |
|
120 | - // decrement the ticket row count since it looks like one has been removed |
|
121 | - $this->ticket_rows--; |
|
122 | - } |
|
92 | + $total_tickets = count($this->tickets); |
|
93 | + // loop through tickets |
|
94 | + foreach ($this->tickets as $ticket) { |
|
95 | + if ($ticket instanceof EE_Ticket) { |
|
96 | + $this->ticket_rows++; |
|
97 | + $cols = 2; |
|
98 | + $taxable_tickets = $ticket->taxable() ? true : $taxable_tickets; |
|
99 | + $ticket_selector_row = new TicketSelectorRowStandard( |
|
100 | + new TicketDetails($ticket, $this->ticket_selector_config, $this->template_args), |
|
101 | + $this->tax_config, |
|
102 | + $total_tickets, |
|
103 | + $this->max_attendees, |
|
104 | + $this->ticket_rows, |
|
105 | + $cols, |
|
106 | + $required_ticket_sold_out, |
|
107 | + $this->template_args['event_status'], |
|
108 | + $datetime_selector instanceof DatetimeSelector |
|
109 | + ? $datetime_selector->getTicketDatetimeClasses($ticket) |
|
110 | + : '', |
|
111 | + $this->ticket_selector_config->useNewCheckboxSelector() |
|
112 | + ); |
|
113 | + $ticket_row_html = $ticket_selector_row->getHtml(); |
|
114 | + // check if something was actually returned |
|
115 | + if (! empty($ticket_row_html)) { |
|
116 | + // add any output to the cumulative HTML |
|
117 | + $all_ticket_rows_html .= $ticket_row_html; |
|
118 | + } |
|
119 | + if (empty($ticket_row_html) || ! $ticket_selector_row->isOnSale()) { |
|
120 | + // decrement the ticket row count since it looks like one has been removed |
|
121 | + $this->ticket_rows--; |
|
122 | + } |
|
123 | 123 | |
124 | - $required_ticket_sold_out = $ticket_selector_row->getRequiredTicketSoldOut(); |
|
125 | - } |
|
126 | - } |
|
127 | - $this->template_args['row'] = $this->ticket_rows; |
|
128 | - $this->template_args['ticket_row_html'] = $all_ticket_rows_html; |
|
129 | - $this->template_args['taxable_tickets'] = $taxable_tickets; |
|
130 | - $this->template_args['use_new_form_styles_class'] = $this->ticket_selector_config->useNewFormStyles() |
|
131 | - ? ' tkt-slctr-use-new-form-styles' |
|
132 | - : ''; |
|
133 | - $this->template_args['prices_displayed_including_taxes'] = $this->tax_config->prices_displayed_including_taxes; |
|
124 | + $required_ticket_sold_out = $ticket_selector_row->getRequiredTicketSoldOut(); |
|
125 | + } |
|
126 | + } |
|
127 | + $this->template_args['row'] = $this->ticket_rows; |
|
128 | + $this->template_args['ticket_row_html'] = $all_ticket_rows_html; |
|
129 | + $this->template_args['taxable_tickets'] = $taxable_tickets; |
|
130 | + $this->template_args['use_new_form_styles_class'] = $this->ticket_selector_config->useNewFormStyles() |
|
131 | + ? ' tkt-slctr-use-new-form-styles' |
|
132 | + : ''; |
|
133 | + $this->template_args['prices_displayed_including_taxes'] = $this->tax_config->prices_displayed_including_taxes; |
|
134 | 134 | |
135 | 135 | |
136 | - /** |
|
137 | - * Filters the text printed for the header of the price column in the ticket selector table |
|
138 | - * |
|
139 | - * @param string 'Price' The translatable text to display in the table header for price |
|
140 | - * @param int $EVT_ID The Event ID |
|
141 | - * @since 4.7.2 |
|
142 | - * |
|
143 | - */ |
|
144 | - $this->template_args['table_header_price'] = apply_filters( |
|
145 | - 'FHEE__ticket_selector_chart_template__table_header_price', |
|
146 | - esc_html__('Price', 'event_espresso'), |
|
147 | - $this->event->ID() |
|
148 | - ); |
|
136 | + /** |
|
137 | + * Filters the text printed for the header of the price column in the ticket selector table |
|
138 | + * |
|
139 | + * @param string 'Price' The translatable text to display in the table header for price |
|
140 | + * @param int $EVT_ID The Event ID |
|
141 | + * @since 4.7.2 |
|
142 | + * |
|
143 | + */ |
|
144 | + $this->template_args['table_header_price'] = apply_filters( |
|
145 | + 'FHEE__ticket_selector_chart_template__table_header_price', |
|
146 | + esc_html__('Price', 'event_espresso'), |
|
147 | + $this->event->ID() |
|
148 | + ); |
|
149 | 149 | |
150 | - /** |
|
151 | - * Filters the text printed for the header of the quantity column in the ticket selector table |
|
152 | - * |
|
153 | - * @param string 'Qty' The translatable text to display in the table header for the Quantity of tickets |
|
154 | - * @param int $EVT_ID The Event ID |
|
155 | - * @since 4.7.2 |
|
156 | - * |
|
157 | - */ |
|
158 | - $this->template_args['table_header_qty'] = apply_filters( |
|
159 | - 'FHEE__ticket_selector_chart_template__table_header_qty', |
|
160 | - esc_html__('Qty', 'event_espresso'), |
|
161 | - $this->event->ID() |
|
162 | - ); |
|
163 | - $this->template_args['template_path'] = TICKET_SELECTOR_TEMPLATES_PATH . 'standard_ticket_selector.template.php'; |
|
164 | - remove_all_filters('FHEE__EE_Ticket_Selector__hide_ticket_selector'); |
|
165 | - } |
|
150 | + /** |
|
151 | + * Filters the text printed for the header of the quantity column in the ticket selector table |
|
152 | + * |
|
153 | + * @param string 'Qty' The translatable text to display in the table header for the Quantity of tickets |
|
154 | + * @param int $EVT_ID The Event ID |
|
155 | + * @since 4.7.2 |
|
156 | + * |
|
157 | + */ |
|
158 | + $this->template_args['table_header_qty'] = apply_filters( |
|
159 | + 'FHEE__ticket_selector_chart_template__table_header_qty', |
|
160 | + esc_html__('Qty', 'event_espresso'), |
|
161 | + $this->event->ID() |
|
162 | + ); |
|
163 | + $this->template_args['template_path'] = TICKET_SELECTOR_TEMPLATES_PATH . 'standard_ticket_selector.template.php'; |
|
164 | + remove_all_filters('FHEE__EE_Ticket_Selector__hide_ticket_selector'); |
|
165 | + } |
|
166 | 166 | } |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | $this->ticket_selector_config->getShowDatetimeSelector() |
80 | 80 | !== EE_Ticket_Selector_Config::DO_NOT_SHOW_DATETIME_SELECTOR |
81 | 81 | ) { |
82 | - $datetime_selector = new DatetimeSelector( |
|
82 | + $datetime_selector = new DatetimeSelector( |
|
83 | 83 | $this->event, |
84 | 84 | $this->tickets, |
85 | 85 | $this->ticket_selector_config, |
@@ -110,9 +110,9 @@ discard block |
||
110 | 110 | : '', |
111 | 111 | $this->ticket_selector_config->useNewCheckboxSelector() |
112 | 112 | ); |
113 | - $ticket_row_html = $ticket_selector_row->getHtml(); |
|
113 | + $ticket_row_html = $ticket_selector_row->getHtml(); |
|
114 | 114 | // check if something was actually returned |
115 | - if (! empty($ticket_row_html)) { |
|
115 | + if ( ! empty($ticket_row_html)) { |
|
116 | 116 | // add any output to the cumulative HTML |
117 | 117 | $all_ticket_rows_html .= $ticket_row_html; |
118 | 118 | } |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | esc_html__('Qty', 'event_espresso'), |
161 | 161 | $this->event->ID() |
162 | 162 | ); |
163 | - $this->template_args['template_path'] = TICKET_SELECTOR_TEMPLATES_PATH . 'standard_ticket_selector.template.php'; |
|
163 | + $this->template_args['template_path'] = TICKET_SELECTOR_TEMPLATES_PATH.'standard_ticket_selector.template.php'; |
|
164 | 164 | remove_all_filters('FHEE__EE_Ticket_Selector__hide_ticket_selector'); |
165 | 165 | } |
166 | 166 | } |
@@ -34,461 +34,461 @@ |
||
34 | 34 | */ |
35 | 35 | class ProcessTicketSelector |
36 | 36 | { |
37 | - private ?EE_Cart $cart = null; |
|
37 | + private ?EE_Cart $cart = null; |
|
38 | 38 | |
39 | - private EE_Core_Config $core_config; |
|
39 | + private EE_Core_Config $core_config; |
|
40 | 40 | |
41 | - private RequestInterface $request; |
|
41 | + private RequestInterface $request; |
|
42 | 42 | |
43 | - private EE_Session $session; |
|
43 | + private EE_Session $session; |
|
44 | 44 | |
45 | - private EEM_Ticket $ticket_model; |
|
45 | + private EEM_Ticket $ticket_model; |
|
46 | 46 | |
47 | - private TicketDatetimeAvailabilityTracker $tracker; |
|
47 | + private TicketDatetimeAvailabilityTracker $tracker; |
|
48 | 48 | |
49 | 49 | |
50 | - /** |
|
51 | - * ProcessTicketSelector constructor. |
|
52 | - * NOTE: PLZ use the Loader to instantiate this class if need be |
|
53 | - * so that all dependencies get injected correctly (which will happen automatically) |
|
54 | - * Null values for parameters are only for backwards compatibility but will be removed later on. |
|
55 | - * |
|
56 | - * @param EE_Core_Config|null $core_config |
|
57 | - * @param RequestInterface|null $request |
|
58 | - * @param EE_Session|null $session |
|
59 | - * @param EEM_Ticket|null $ticket_model |
|
60 | - * @param TicketDatetimeAvailabilityTracker|null $tracker |
|
61 | - * @throws InvalidArgumentException |
|
62 | - * @throws InvalidDataTypeException |
|
63 | - * @throws InvalidInterfaceException |
|
64 | - */ |
|
65 | - public function __construct( |
|
66 | - EE_Core_Config $core_config = null, |
|
67 | - RequestInterface $request = null, |
|
68 | - EE_Session $session = null, |
|
69 | - EEM_Ticket $ticket_model = null, |
|
70 | - TicketDatetimeAvailabilityTracker $tracker = null |
|
71 | - ) { |
|
72 | - $loader = LoaderFactory::getLoader(); |
|
73 | - $this->core_config = $core_config instanceof EE_Core_Config |
|
74 | - ? $core_config |
|
75 | - : $loader->getShared('EE_Core_Config'); |
|
76 | - $this->request = $request instanceof RequestInterface |
|
77 | - ? $request |
|
78 | - : $loader->getShared('EventEspresso\core\services\request\Request'); |
|
79 | - $this->session = $session instanceof EE_Session |
|
80 | - ? $session |
|
81 | - : $loader->getShared('EE_Session'); |
|
82 | - $this->ticket_model = $ticket_model instanceof EEM_Ticket |
|
83 | - ? $ticket_model |
|
84 | - : $loader->getShared('EEM_Ticket'); |
|
85 | - $this->tracker = $tracker instanceof TicketDatetimeAvailabilityTracker |
|
86 | - ? $tracker |
|
87 | - : $loader->getShared('EventEspresso\modules\ticket_selector\TicketDatetimeAvailabilityTracker'); |
|
88 | - } |
|
50 | + /** |
|
51 | + * ProcessTicketSelector constructor. |
|
52 | + * NOTE: PLZ use the Loader to instantiate this class if need be |
|
53 | + * so that all dependencies get injected correctly (which will happen automatically) |
|
54 | + * Null values for parameters are only for backwards compatibility but will be removed later on. |
|
55 | + * |
|
56 | + * @param EE_Core_Config|null $core_config |
|
57 | + * @param RequestInterface|null $request |
|
58 | + * @param EE_Session|null $session |
|
59 | + * @param EEM_Ticket|null $ticket_model |
|
60 | + * @param TicketDatetimeAvailabilityTracker|null $tracker |
|
61 | + * @throws InvalidArgumentException |
|
62 | + * @throws InvalidDataTypeException |
|
63 | + * @throws InvalidInterfaceException |
|
64 | + */ |
|
65 | + public function __construct( |
|
66 | + EE_Core_Config $core_config = null, |
|
67 | + RequestInterface $request = null, |
|
68 | + EE_Session $session = null, |
|
69 | + EEM_Ticket $ticket_model = null, |
|
70 | + TicketDatetimeAvailabilityTracker $tracker = null |
|
71 | + ) { |
|
72 | + $loader = LoaderFactory::getLoader(); |
|
73 | + $this->core_config = $core_config instanceof EE_Core_Config |
|
74 | + ? $core_config |
|
75 | + : $loader->getShared('EE_Core_Config'); |
|
76 | + $this->request = $request instanceof RequestInterface |
|
77 | + ? $request |
|
78 | + : $loader->getShared('EventEspresso\core\services\request\Request'); |
|
79 | + $this->session = $session instanceof EE_Session |
|
80 | + ? $session |
|
81 | + : $loader->getShared('EE_Session'); |
|
82 | + $this->ticket_model = $ticket_model instanceof EEM_Ticket |
|
83 | + ? $ticket_model |
|
84 | + : $loader->getShared('EEM_Ticket'); |
|
85 | + $this->tracker = $tracker instanceof TicketDatetimeAvailabilityTracker |
|
86 | + ? $tracker |
|
87 | + : $loader->getShared('EventEspresso\modules\ticket_selector\TicketDatetimeAvailabilityTracker'); |
|
88 | + } |
|
89 | 89 | |
90 | 90 | |
91 | - /** |
|
92 | - * cancelTicketSelections |
|
93 | - * |
|
94 | - * @return bool |
|
95 | - * @throws EE_Error |
|
96 | - * @throws InvalidArgumentException |
|
97 | - * @throws InvalidInterfaceException |
|
98 | - * @throws InvalidDataTypeException |
|
99 | - * @throws ReflectionException |
|
100 | - */ |
|
101 | - public function cancelTicketSelections(): bool |
|
102 | - { |
|
103 | - // check nonce |
|
104 | - if (! $this->processTicketSelectorNonce()) { |
|
105 | - return false; |
|
106 | - } |
|
107 | - $this->session->clear_session(__CLASS__, __FUNCTION__); |
|
108 | - if ($this->request->requestParamIsSet('event_id')) { |
|
109 | - EEH_URL::safeRedirectAndExit( |
|
110 | - EEH_Event_View::event_link_url( |
|
111 | - $this->request->getRequestParam('event_id', 0, 'int') |
|
112 | - ) |
|
113 | - ); |
|
114 | - } |
|
115 | - EEH_URL::safeRedirectAndExit( |
|
116 | - site_url('/' . $this->core_config->event_cpt_slug . '/') |
|
117 | - ); |
|
118 | - return true; |
|
119 | - } |
|
91 | + /** |
|
92 | + * cancelTicketSelections |
|
93 | + * |
|
94 | + * @return bool |
|
95 | + * @throws EE_Error |
|
96 | + * @throws InvalidArgumentException |
|
97 | + * @throws InvalidInterfaceException |
|
98 | + * @throws InvalidDataTypeException |
|
99 | + * @throws ReflectionException |
|
100 | + */ |
|
101 | + public function cancelTicketSelections(): bool |
|
102 | + { |
|
103 | + // check nonce |
|
104 | + if (! $this->processTicketSelectorNonce()) { |
|
105 | + return false; |
|
106 | + } |
|
107 | + $this->session->clear_session(__CLASS__, __FUNCTION__); |
|
108 | + if ($this->request->requestParamIsSet('event_id')) { |
|
109 | + EEH_URL::safeRedirectAndExit( |
|
110 | + EEH_Event_View::event_link_url( |
|
111 | + $this->request->getRequestParam('event_id', 0, 'int') |
|
112 | + ) |
|
113 | + ); |
|
114 | + } |
|
115 | + EEH_URL::safeRedirectAndExit( |
|
116 | + site_url('/' . $this->core_config->event_cpt_slug . '/') |
|
117 | + ); |
|
118 | + return true; |
|
119 | + } |
|
120 | 120 | |
121 | 121 | |
122 | - /** |
|
123 | - * processTicketSelectorNonce |
|
124 | - * |
|
125 | - * @return bool |
|
126 | - */ |
|
127 | - private function processTicketSelectorNonce(): bool |
|
128 | - { |
|
129 | - if ( |
|
130 | - ! $this->request->isAdmin() |
|
131 | - && ( |
|
132 | - ! $this->request->requestParamIsSet('cancel_ticket_selections_nonce') |
|
133 | - || ! wp_verify_nonce( |
|
134 | - $this->request->getRequestParam('cancel_ticket_selections_nonce'), |
|
135 | - 'cancel_ticket_selections' |
|
136 | - ) |
|
137 | - ) |
|
138 | - ) { |
|
139 | - EE_Error::add_error( |
|
140 | - sprintf( |
|
141 | - esc_html__( |
|
142 | - 'We\'re sorry but your request failed to pass a security check.%sPlease click the back button on your browser and try again.', |
|
143 | - 'event_espresso' |
|
144 | - ), |
|
145 | - '<br/>' |
|
146 | - ), |
|
147 | - __FILE__, |
|
148 | - __FUNCTION__, |
|
149 | - __LINE__ |
|
150 | - ); |
|
151 | - return false; |
|
152 | - } |
|
153 | - return true; |
|
154 | - } |
|
122 | + /** |
|
123 | + * processTicketSelectorNonce |
|
124 | + * |
|
125 | + * @return bool |
|
126 | + */ |
|
127 | + private function processTicketSelectorNonce(): bool |
|
128 | + { |
|
129 | + if ( |
|
130 | + ! $this->request->isAdmin() |
|
131 | + && ( |
|
132 | + ! $this->request->requestParamIsSet('cancel_ticket_selections_nonce') |
|
133 | + || ! wp_verify_nonce( |
|
134 | + $this->request->getRequestParam('cancel_ticket_selections_nonce'), |
|
135 | + 'cancel_ticket_selections' |
|
136 | + ) |
|
137 | + ) |
|
138 | + ) { |
|
139 | + EE_Error::add_error( |
|
140 | + sprintf( |
|
141 | + esc_html__( |
|
142 | + 'We\'re sorry but your request failed to pass a security check.%sPlease click the back button on your browser and try again.', |
|
143 | + 'event_espresso' |
|
144 | + ), |
|
145 | + '<br/>' |
|
146 | + ), |
|
147 | + __FILE__, |
|
148 | + __FUNCTION__, |
|
149 | + __LINE__ |
|
150 | + ); |
|
151 | + return false; |
|
152 | + } |
|
153 | + return true; |
|
154 | + } |
|
155 | 155 | |
156 | 156 | |
157 | - /** |
|
158 | - * process_ticket_selections |
|
159 | - * |
|
160 | - * @return bool |
|
161 | - * @throws EE_Error |
|
162 | - * @throws InvalidArgumentException |
|
163 | - * @throws InvalidDataTypeException |
|
164 | - * @throws InvalidInterfaceException |
|
165 | - * @throws ReflectionException |
|
166 | - */ |
|
167 | - public function processTicketSelections(): bool |
|
168 | - { |
|
169 | - do_action('EED_Ticket_Selector__process_ticket_selections__before'); |
|
170 | - if ($this->request->isBot()) { |
|
171 | - EEH_URL::safeRedirectAndExit( |
|
172 | - apply_filters( |
|
173 | - 'FHEE__EE_Ticket_Selector__process_ticket_selections__bot_redirect_url', |
|
174 | - site_url() |
|
175 | - ) |
|
176 | - ); |
|
177 | - } |
|
178 | - // we should really only have 1 registration in the works now |
|
179 | - // (ie, no MER) so unless otherwise requested, clear the session |
|
180 | - if (apply_filters('FHEE__EE_Ticket_Selector__process_ticket_selections__clear_session', true)) { |
|
181 | - $this->session->clear_session(__CLASS__, __FUNCTION__); |
|
182 | - } |
|
183 | - // validate/sanitize/filter data |
|
184 | - $id = null; |
|
185 | - $valid = []; |
|
186 | - try { |
|
187 | - /** @var ProcessTicketSelectorPostData $post_data_validator */ |
|
188 | - $post_data_validator = LoaderFactory::getNew(ProcessTicketSelectorPostData::class); |
|
189 | - $id = $post_data_validator->getEventId(); |
|
190 | - $valid = apply_filters( |
|
191 | - 'FHEE__EED_Ticket_Selector__process_ticket_selections__valid_post_data', |
|
192 | - $post_data_validator->validatePostData() |
|
193 | - ); |
|
194 | - if ($this->processSuccessfulCart($this->addTicketsToCart($valid))) { |
|
195 | - return true; |
|
196 | - } |
|
197 | - } catch (Exception $exception) { |
|
198 | - EE_Error::add_error($exception->getMessage(), __FILE__, __FUNCTION__, __LINE__); |
|
199 | - } |
|
200 | - // die(); // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< KILL BEFORE REDIRECT |
|
201 | - // at this point, just return if registration is being made from admin |
|
202 | - if ($this->request->isAdmin() || $this->request->isFrontAjax()) { |
|
203 | - return false; |
|
204 | - } |
|
205 | - if (! empty($valid['return_url'])) { |
|
206 | - EEH_URL::safeRedirectAndExit($valid['return_url']); |
|
207 | - } |
|
208 | - // do we have an event id? |
|
209 | - if ($id) { |
|
210 | - EEH_URL::safeRedirectAndExit(get_permalink($id)); |
|
211 | - } |
|
212 | - echo EE_Error::get_notices(); // already escaped |
|
213 | - return false; |
|
214 | - } |
|
157 | + /** |
|
158 | + * process_ticket_selections |
|
159 | + * |
|
160 | + * @return bool |
|
161 | + * @throws EE_Error |
|
162 | + * @throws InvalidArgumentException |
|
163 | + * @throws InvalidDataTypeException |
|
164 | + * @throws InvalidInterfaceException |
|
165 | + * @throws ReflectionException |
|
166 | + */ |
|
167 | + public function processTicketSelections(): bool |
|
168 | + { |
|
169 | + do_action('EED_Ticket_Selector__process_ticket_selections__before'); |
|
170 | + if ($this->request->isBot()) { |
|
171 | + EEH_URL::safeRedirectAndExit( |
|
172 | + apply_filters( |
|
173 | + 'FHEE__EE_Ticket_Selector__process_ticket_selections__bot_redirect_url', |
|
174 | + site_url() |
|
175 | + ) |
|
176 | + ); |
|
177 | + } |
|
178 | + // we should really only have 1 registration in the works now |
|
179 | + // (ie, no MER) so unless otherwise requested, clear the session |
|
180 | + if (apply_filters('FHEE__EE_Ticket_Selector__process_ticket_selections__clear_session', true)) { |
|
181 | + $this->session->clear_session(__CLASS__, __FUNCTION__); |
|
182 | + } |
|
183 | + // validate/sanitize/filter data |
|
184 | + $id = null; |
|
185 | + $valid = []; |
|
186 | + try { |
|
187 | + /** @var ProcessTicketSelectorPostData $post_data_validator */ |
|
188 | + $post_data_validator = LoaderFactory::getNew(ProcessTicketSelectorPostData::class); |
|
189 | + $id = $post_data_validator->getEventId(); |
|
190 | + $valid = apply_filters( |
|
191 | + 'FHEE__EED_Ticket_Selector__process_ticket_selections__valid_post_data', |
|
192 | + $post_data_validator->validatePostData() |
|
193 | + ); |
|
194 | + if ($this->processSuccessfulCart($this->addTicketsToCart($valid))) { |
|
195 | + return true; |
|
196 | + } |
|
197 | + } catch (Exception $exception) { |
|
198 | + EE_Error::add_error($exception->getMessage(), __FILE__, __FUNCTION__, __LINE__); |
|
199 | + } |
|
200 | + // die(); // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< KILL BEFORE REDIRECT |
|
201 | + // at this point, just return if registration is being made from admin |
|
202 | + if ($this->request->isAdmin() || $this->request->isFrontAjax()) { |
|
203 | + return false; |
|
204 | + } |
|
205 | + if (! empty($valid['return_url'])) { |
|
206 | + EEH_URL::safeRedirectAndExit($valid['return_url']); |
|
207 | + } |
|
208 | + // do we have an event id? |
|
209 | + if ($id) { |
|
210 | + EEH_URL::safeRedirectAndExit(get_permalink($id)); |
|
211 | + } |
|
212 | + echo EE_Error::get_notices(); // already escaped |
|
213 | + return false; |
|
214 | + } |
|
215 | 215 | |
216 | 216 | |
217 | - /** |
|
218 | - * checks total tickets ordered vs max number of attendees that can register |
|
219 | - * |
|
220 | - * @param array $valid |
|
221 | - * @return bool |
|
222 | - */ |
|
223 | - private function maxAttendeesViolation(array $valid): bool |
|
224 | - { |
|
225 | - if ($valid['total_tickets'] <= $valid['max_atndz']) { |
|
226 | - return false; |
|
227 | - } |
|
228 | - // ordering too many tickets !!! |
|
229 | - $total_tickets_string = esc_html( |
|
230 | - _n( |
|
231 | - 'You have attempted to purchase %s ticket.', |
|
232 | - 'You have attempted to purchase %s tickets.', |
|
233 | - $valid['total_tickets'], |
|
234 | - 'event_espresso' |
|
235 | - ) |
|
236 | - ); |
|
237 | - $limit_error_1 = sprintf($total_tickets_string, $valid['total_tickets']); |
|
238 | - // dev only message |
|
239 | - $max_attendees_string = esc_html( |
|
240 | - _n( |
|
241 | - 'The registration limit for this event is %s ticket per registration, therefore the total number of tickets you may purchase at a time can not exceed %s.', |
|
242 | - 'The registration limit for this event is %s tickets per registration, therefore the total number of tickets you may purchase at a time can not exceed %s.', |
|
243 | - $valid['max_atndz'], |
|
244 | - 'event_espresso' |
|
245 | - ) |
|
246 | - ); |
|
247 | - $limit_error_2 = sprintf($max_attendees_string, $valid['max_atndz'], $valid['max_atndz']); |
|
248 | - EE_Error::add_error($limit_error_1 . '<br/>' . $limit_error_2, __FILE__, __FUNCTION__, __LINE__); |
|
249 | - return true; |
|
250 | - } |
|
217 | + /** |
|
218 | + * checks total tickets ordered vs max number of attendees that can register |
|
219 | + * |
|
220 | + * @param array $valid |
|
221 | + * @return bool |
|
222 | + */ |
|
223 | + private function maxAttendeesViolation(array $valid): bool |
|
224 | + { |
|
225 | + if ($valid['total_tickets'] <= $valid['max_atndz']) { |
|
226 | + return false; |
|
227 | + } |
|
228 | + // ordering too many tickets !!! |
|
229 | + $total_tickets_string = esc_html( |
|
230 | + _n( |
|
231 | + 'You have attempted to purchase %s ticket.', |
|
232 | + 'You have attempted to purchase %s tickets.', |
|
233 | + $valid['total_tickets'], |
|
234 | + 'event_espresso' |
|
235 | + ) |
|
236 | + ); |
|
237 | + $limit_error_1 = sprintf($total_tickets_string, $valid['total_tickets']); |
|
238 | + // dev only message |
|
239 | + $max_attendees_string = esc_html( |
|
240 | + _n( |
|
241 | + 'The registration limit for this event is %s ticket per registration, therefore the total number of tickets you may purchase at a time can not exceed %s.', |
|
242 | + 'The registration limit for this event is %s tickets per registration, therefore the total number of tickets you may purchase at a time can not exceed %s.', |
|
243 | + $valid['max_atndz'], |
|
244 | + 'event_espresso' |
|
245 | + ) |
|
246 | + ); |
|
247 | + $limit_error_2 = sprintf($max_attendees_string, $valid['max_atndz'], $valid['max_atndz']); |
|
248 | + EE_Error::add_error($limit_error_1 . '<br/>' . $limit_error_2, __FILE__, __FUNCTION__, __LINE__); |
|
249 | + return true; |
|
250 | + } |
|
251 | 251 | |
252 | 252 | |
253 | - /** |
|
254 | - * @param array $valid |
|
255 | - * @return int |
|
256 | - * @throws EE_Error |
|
257 | - * @throws InvalidArgumentException |
|
258 | - * @throws InvalidDataTypeException |
|
259 | - * @throws InvalidInterfaceException |
|
260 | - * @throws ReflectionException |
|
261 | - */ |
|
262 | - private function addTicketsToCart(array $valid): int |
|
263 | - { |
|
264 | - if ($this->maxAttendeesViolation($valid)) { |
|
265 | - return 0; |
|
266 | - } |
|
267 | - $tickets_added = 0; |
|
268 | - $tickets_selected = false; |
|
269 | - if (! empty($valid['ticket-selections']) && $valid['total_tickets'] > 0) { |
|
270 | - // load cart using factory because we don't want to do so until actually needed |
|
271 | - $this->cart = CartFactory::getCart(); |
|
272 | - // if the user is an admin that can edit registrations, |
|
273 | - // then we'll also allow them to add any tickets, even if they are expired |
|
274 | - $current_user_is_admin = current_user_can('ee_edit_registrations'); |
|
275 | - // cycle thru the number of data rows sent from the event listing |
|
276 | - foreach ($valid['ticket-selections'] as $ticket_id => $qty) { |
|
277 | - if ($qty) { |
|
278 | - // YES we have a ticket quantity |
|
279 | - $tickets_selected = true; |
|
280 | - // get ticket via the ticket id we put in the form |
|
281 | - $ticket = $this->ticket_model->get_one_by_ID($ticket_id); |
|
282 | - if ( |
|
283 | - ! $this->isValidTicket($ticket) |
|
284 | - || ! $this->ticketAvailableForPurchase($ticket, $current_user_is_admin) |
|
285 | - || $this->ticketMaxQtyAlreadyReached($ticket, $qty) |
|
286 | - || EE_Error::has_error() |
|
287 | - ) { |
|
288 | - break; |
|
289 | - } |
|
290 | - $tickets_added += $this->addTicketToCart($ticket, $qty); |
|
291 | - } |
|
292 | - } |
|
293 | - } |
|
294 | - do_action( |
|
295 | - 'AHEE__EE_Ticket_Selector__process_ticket_selections__after_tickets_added_to_cart', |
|
296 | - $this->cart, |
|
297 | - $this |
|
298 | - ); |
|
299 | - if (! apply_filters('FHEE__EED_Ticket_Selector__process_ticket_selections__tckts_slctd', $tickets_selected)) { |
|
300 | - // no ticket quantities were selected |
|
301 | - EE_Error::add_error( |
|
302 | - esc_html__('You need to select a ticket quantity before you can proceed.', 'event_espresso'), |
|
303 | - __FILE__, |
|
304 | - __FUNCTION__, |
|
305 | - __LINE__ |
|
306 | - ); |
|
307 | - } |
|
308 | - return $tickets_added; |
|
309 | - } |
|
253 | + /** |
|
254 | + * @param array $valid |
|
255 | + * @return int |
|
256 | + * @throws EE_Error |
|
257 | + * @throws InvalidArgumentException |
|
258 | + * @throws InvalidDataTypeException |
|
259 | + * @throws InvalidInterfaceException |
|
260 | + * @throws ReflectionException |
|
261 | + */ |
|
262 | + private function addTicketsToCart(array $valid): int |
|
263 | + { |
|
264 | + if ($this->maxAttendeesViolation($valid)) { |
|
265 | + return 0; |
|
266 | + } |
|
267 | + $tickets_added = 0; |
|
268 | + $tickets_selected = false; |
|
269 | + if (! empty($valid['ticket-selections']) && $valid['total_tickets'] > 0) { |
|
270 | + // load cart using factory because we don't want to do so until actually needed |
|
271 | + $this->cart = CartFactory::getCart(); |
|
272 | + // if the user is an admin that can edit registrations, |
|
273 | + // then we'll also allow them to add any tickets, even if they are expired |
|
274 | + $current_user_is_admin = current_user_can('ee_edit_registrations'); |
|
275 | + // cycle thru the number of data rows sent from the event listing |
|
276 | + foreach ($valid['ticket-selections'] as $ticket_id => $qty) { |
|
277 | + if ($qty) { |
|
278 | + // YES we have a ticket quantity |
|
279 | + $tickets_selected = true; |
|
280 | + // get ticket via the ticket id we put in the form |
|
281 | + $ticket = $this->ticket_model->get_one_by_ID($ticket_id); |
|
282 | + if ( |
|
283 | + ! $this->isValidTicket($ticket) |
|
284 | + || ! $this->ticketAvailableForPurchase($ticket, $current_user_is_admin) |
|
285 | + || $this->ticketMaxQtyAlreadyReached($ticket, $qty) |
|
286 | + || EE_Error::has_error() |
|
287 | + ) { |
|
288 | + break; |
|
289 | + } |
|
290 | + $tickets_added += $this->addTicketToCart($ticket, $qty); |
|
291 | + } |
|
292 | + } |
|
293 | + } |
|
294 | + do_action( |
|
295 | + 'AHEE__EE_Ticket_Selector__process_ticket_selections__after_tickets_added_to_cart', |
|
296 | + $this->cart, |
|
297 | + $this |
|
298 | + ); |
|
299 | + if (! apply_filters('FHEE__EED_Ticket_Selector__process_ticket_selections__tckts_slctd', $tickets_selected)) { |
|
300 | + // no ticket quantities were selected |
|
301 | + EE_Error::add_error( |
|
302 | + esc_html__('You need to select a ticket quantity before you can proceed.', 'event_espresso'), |
|
303 | + __FILE__, |
|
304 | + __FUNCTION__, |
|
305 | + __LINE__ |
|
306 | + ); |
|
307 | + } |
|
308 | + return $tickets_added; |
|
309 | + } |
|
310 | 310 | |
311 | 311 | |
312 | - /** |
|
313 | - * @param EE_Ticket|null $ticket |
|
314 | - * @return bool |
|
315 | - * @since 5.0.28.p |
|
316 | - */ |
|
317 | - private function isValidTicket(?EE_Ticket $ticket): bool |
|
318 | - { |
|
319 | - if ($ticket instanceof EE_Ticket) { |
|
320 | - return true; |
|
321 | - } |
|
322 | - EE_Error::add_error( |
|
323 | - sprintf( |
|
324 | - esc_html__( |
|
325 | - 'A valid ticket could not be retrieved for the event.%sPlease click the back button on your browser and try again.', |
|
326 | - 'event_espresso' |
|
327 | - ), |
|
328 | - '<br/>' |
|
329 | - ), |
|
330 | - __FILE__, |
|
331 | - __FUNCTION__, |
|
332 | - __LINE__ |
|
333 | - ); |
|
334 | - return false; |
|
335 | - } |
|
312 | + /** |
|
313 | + * @param EE_Ticket|null $ticket |
|
314 | + * @return bool |
|
315 | + * @since 5.0.28.p |
|
316 | + */ |
|
317 | + private function isValidTicket(?EE_Ticket $ticket): bool |
|
318 | + { |
|
319 | + if ($ticket instanceof EE_Ticket) { |
|
320 | + return true; |
|
321 | + } |
|
322 | + EE_Error::add_error( |
|
323 | + sprintf( |
|
324 | + esc_html__( |
|
325 | + 'A valid ticket could not be retrieved for the event.%sPlease click the back button on your browser and try again.', |
|
326 | + 'event_espresso' |
|
327 | + ), |
|
328 | + '<br/>' |
|
329 | + ), |
|
330 | + __FILE__, |
|
331 | + __FUNCTION__, |
|
332 | + __LINE__ |
|
333 | + ); |
|
334 | + return false; |
|
335 | + } |
|
336 | 336 | |
337 | 337 | |
338 | - /** |
|
339 | - * @param EE_Ticket $ticket |
|
340 | - * @param bool $current_user_is_admin |
|
341 | - * @return bool |
|
342 | - * @throws EE_Error |
|
343 | - * @throws ReflectionException |
|
344 | - * @since 5.0.28.p |
|
345 | - */ |
|
346 | - private function ticketAvailableForPurchase(EE_Ticket $ticket, bool $current_user_is_admin): bool |
|
347 | - { |
|
348 | - if ($ticket->is_on_sale() || $current_user_is_admin) { |
|
349 | - return true; |
|
350 | - } |
|
351 | - EE_Error::add_error( |
|
352 | - sprintf( |
|
353 | - esc_html__( |
|
354 | - 'We\'re sorry but that ticket is no longer on sale.%sPlease click the back button on your browser and try again.', |
|
355 | - 'event_espresso' |
|
356 | - ), |
|
357 | - '<br/>' |
|
358 | - ), |
|
359 | - __FILE__, |
|
360 | - __FUNCTION__, |
|
361 | - __LINE__ |
|
362 | - ); |
|
363 | - return false; |
|
364 | - } |
|
338 | + /** |
|
339 | + * @param EE_Ticket $ticket |
|
340 | + * @param bool $current_user_is_admin |
|
341 | + * @return bool |
|
342 | + * @throws EE_Error |
|
343 | + * @throws ReflectionException |
|
344 | + * @since 5.0.28.p |
|
345 | + */ |
|
346 | + private function ticketAvailableForPurchase(EE_Ticket $ticket, bool $current_user_is_admin): bool |
|
347 | + { |
|
348 | + if ($ticket->is_on_sale() || $current_user_is_admin) { |
|
349 | + return true; |
|
350 | + } |
|
351 | + EE_Error::add_error( |
|
352 | + sprintf( |
|
353 | + esc_html__( |
|
354 | + 'We\'re sorry but that ticket is no longer on sale.%sPlease click the back button on your browser and try again.', |
|
355 | + 'event_espresso' |
|
356 | + ), |
|
357 | + '<br/>' |
|
358 | + ), |
|
359 | + __FILE__, |
|
360 | + __FUNCTION__, |
|
361 | + __LINE__ |
|
362 | + ); |
|
363 | + return false; |
|
364 | + } |
|
365 | 365 | |
366 | 366 | |
367 | - /** |
|
368 | - * adds a ticket to the cart |
|
369 | - * |
|
370 | - * @param EE_Ticket $ticket |
|
371 | - * @param int $qty |
|
372 | - * @return bool TRUE on success, FALSE on fail |
|
373 | - * @throws InvalidArgumentException |
|
374 | - * @throws InvalidInterfaceException |
|
375 | - * @throws InvalidDataTypeException |
|
376 | - * @throws EE_Error |
|
377 | - * @throws ReflectionException |
|
378 | - */ |
|
379 | - private function addTicketToCart(EE_Ticket $ticket, int $qty = 1): bool |
|
380 | - { |
|
381 | - // get the number of spaces left for this datetime ticket |
|
382 | - $available_spaces = $this->tracker->ticketDatetimeAvailability($ticket); |
|
383 | - // compare available spaces against the number of tickets being purchased |
|
384 | - if ($available_spaces >= $qty) { |
|
385 | - // allow addons to prevent a ticket from being added to cart |
|
386 | - if ( |
|
387 | - ! apply_filters( |
|
388 | - 'FHEE__EE_Ticket_Selector___add_ticket_to_cart__allow_add_to_cart', |
|
389 | - true, |
|
390 | - $ticket, |
|
391 | - $qty, |
|
392 | - $available_spaces |
|
393 | - ) |
|
394 | - ) { |
|
395 | - return false; |
|
396 | - } |
|
397 | - $qty = absint(apply_filters('FHEE__EE_Ticket_Selector___add_ticket_to_cart__ticket_qty', $qty, $ticket)); |
|
398 | - // add event to cart |
|
399 | - if ($this->cart->add_ticket_to_cart($ticket, $qty)) { |
|
400 | - $this->tracker->recalculateTicketDatetimeAvailability($ticket, $qty); |
|
401 | - return true; |
|
402 | - } |
|
403 | - return false; |
|
404 | - } |
|
405 | - $this->tracker->processAvailabilityError($ticket, $qty, $this->cart->all_ticket_quantity_count()); |
|
406 | - return false; |
|
407 | - } |
|
367 | + /** |
|
368 | + * adds a ticket to the cart |
|
369 | + * |
|
370 | + * @param EE_Ticket $ticket |
|
371 | + * @param int $qty |
|
372 | + * @return bool TRUE on success, FALSE on fail |
|
373 | + * @throws InvalidArgumentException |
|
374 | + * @throws InvalidInterfaceException |
|
375 | + * @throws InvalidDataTypeException |
|
376 | + * @throws EE_Error |
|
377 | + * @throws ReflectionException |
|
378 | + */ |
|
379 | + private function addTicketToCart(EE_Ticket $ticket, int $qty = 1): bool |
|
380 | + { |
|
381 | + // get the number of spaces left for this datetime ticket |
|
382 | + $available_spaces = $this->tracker->ticketDatetimeAvailability($ticket); |
|
383 | + // compare available spaces against the number of tickets being purchased |
|
384 | + if ($available_spaces >= $qty) { |
|
385 | + // allow addons to prevent a ticket from being added to cart |
|
386 | + if ( |
|
387 | + ! apply_filters( |
|
388 | + 'FHEE__EE_Ticket_Selector___add_ticket_to_cart__allow_add_to_cart', |
|
389 | + true, |
|
390 | + $ticket, |
|
391 | + $qty, |
|
392 | + $available_spaces |
|
393 | + ) |
|
394 | + ) { |
|
395 | + return false; |
|
396 | + } |
|
397 | + $qty = absint(apply_filters('FHEE__EE_Ticket_Selector___add_ticket_to_cart__ticket_qty', $qty, $ticket)); |
|
398 | + // add event to cart |
|
399 | + if ($this->cart->add_ticket_to_cart($ticket, $qty)) { |
|
400 | + $this->tracker->recalculateTicketDatetimeAvailability($ticket, $qty); |
|
401 | + return true; |
|
402 | + } |
|
403 | + return false; |
|
404 | + } |
|
405 | + $this->tracker->processAvailabilityError($ticket, $qty, $this->cart->all_ticket_quantity_count()); |
|
406 | + return false; |
|
407 | + } |
|
408 | 408 | |
409 | 409 | |
410 | - /** |
|
411 | - * @param EE_Ticket $ticket |
|
412 | - * @param int $qty |
|
413 | - * @return bool |
|
414 | - * @throws EE_Error |
|
415 | - * @throws ReflectionException |
|
416 | - * @since 5.0.28.p |
|
417 | - */ |
|
418 | - private function ticketMaxQtyAlreadyReached(EE_Ticket $ticket, int $qty): bool |
|
419 | - { |
|
420 | - $tickets_in_cart = $this->cart->get_tickets(); |
|
421 | - foreach ($tickets_in_cart as $ticket_in_cart) { |
|
422 | - if ( |
|
423 | - $ticket_in_cart instanceof EE_Line_Item |
|
424 | - && $ticket_in_cart->OBJ_ID() === $ticket->ID() |
|
425 | - && $ticket_in_cart->quantity() + $qty > $ticket->max() |
|
426 | - ) { |
|
427 | - EE_Error::add_error( |
|
428 | - sprintf( |
|
429 | - esc_html__( |
|
430 | - 'We\'re sorry but a maximum quantity of %1$d ticket can be purchased at a time, and there is already %1$d ticket(s) in the cart.', |
|
431 | - 'event_espresso' |
|
432 | - ), |
|
433 | - $ticket->max(), |
|
434 | - $ticket_in_cart->quantity() + $qty |
|
435 | - ), |
|
436 | - __FILE__, |
|
437 | - __FUNCTION__, |
|
438 | - __LINE__ |
|
439 | - ); |
|
440 | - return true; |
|
441 | - } |
|
442 | - } |
|
443 | - return false; |
|
444 | - } |
|
410 | + /** |
|
411 | + * @param EE_Ticket $ticket |
|
412 | + * @param int $qty |
|
413 | + * @return bool |
|
414 | + * @throws EE_Error |
|
415 | + * @throws ReflectionException |
|
416 | + * @since 5.0.28.p |
|
417 | + */ |
|
418 | + private function ticketMaxQtyAlreadyReached(EE_Ticket $ticket, int $qty): bool |
|
419 | + { |
|
420 | + $tickets_in_cart = $this->cart->get_tickets(); |
|
421 | + foreach ($tickets_in_cart as $ticket_in_cart) { |
|
422 | + if ( |
|
423 | + $ticket_in_cart instanceof EE_Line_Item |
|
424 | + && $ticket_in_cart->OBJ_ID() === $ticket->ID() |
|
425 | + && $ticket_in_cart->quantity() + $qty > $ticket->max() |
|
426 | + ) { |
|
427 | + EE_Error::add_error( |
|
428 | + sprintf( |
|
429 | + esc_html__( |
|
430 | + 'We\'re sorry but a maximum quantity of %1$d ticket can be purchased at a time, and there is already %1$d ticket(s) in the cart.', |
|
431 | + 'event_espresso' |
|
432 | + ), |
|
433 | + $ticket->max(), |
|
434 | + $ticket_in_cart->quantity() + $qty |
|
435 | + ), |
|
436 | + __FILE__, |
|
437 | + __FUNCTION__, |
|
438 | + __LINE__ |
|
439 | + ); |
|
440 | + return true; |
|
441 | + } |
|
442 | + } |
|
443 | + return false; |
|
444 | + } |
|
445 | 445 | |
446 | 446 | |
447 | - /** |
|
448 | - * @param $tickets_added |
|
449 | - * @return bool |
|
450 | - * @throws InvalidInterfaceException |
|
451 | - * @throws InvalidDataTypeException |
|
452 | - * @throws EE_Error |
|
453 | - * @throws InvalidArgumentException |
|
454 | - * @throws ReflectionException |
|
455 | - */ |
|
456 | - private function processSuccessfulCart($tickets_added): bool |
|
457 | - { |
|
458 | - // exit('KILL REDIRECT BEFORE CART UPDATE'); // <<<<<<<<<<<<<<<<< KILL REDIRECT HERE BEFORE CART UPDATE |
|
459 | - if (apply_filters('FHEE__EED_Ticket_Selector__process_ticket_selections__success', $tickets_added)) { |
|
460 | - // make sure cart is loaded |
|
461 | - if (! $this->cart instanceof EE_Cart) { |
|
462 | - $this->cart = CartFactory::getCart(); |
|
463 | - } |
|
464 | - do_action( |
|
465 | - 'FHEE__EE_Ticket_Selector__process_ticket_selections__before_redirecting_to_checkout', |
|
466 | - $this->cart, |
|
467 | - $this |
|
468 | - ); |
|
469 | - $this->cart->recalculate_all_cart_totals(); |
|
470 | - $this->cart->save_cart(false); |
|
471 | - // exit('KILL REDIRECT AFTER CART UPDATE'); // <<<<<<<< OR HERE TO KILL REDIRECT AFTER CART UPDATE |
|
472 | - // just return TRUE for registrations being made from admin |
|
473 | - if ($this->request->isAdmin() || $this->request->isFrontAjax()) { |
|
474 | - return true; |
|
475 | - } |
|
476 | - EEH_URL::safeRedirectAndExit( |
|
477 | - apply_filters( |
|
478 | - 'FHEE__EE_Ticket_Selector__process_ticket_selections__success_redirect_url', |
|
479 | - $this->core_config->reg_page_url() |
|
480 | - ) |
|
481 | - ); |
|
482 | - } |
|
483 | - if (! EE_Error::has_error() && ! EE_Error::has_error(true, 'attention')) { |
|
484 | - // nothing added to cart |
|
485 | - EE_Error::add_attention( |
|
486 | - esc_html__('No tickets were added for the event', 'event_espresso'), |
|
487 | - __FILE__, |
|
488 | - __FUNCTION__, |
|
489 | - __LINE__ |
|
490 | - ); |
|
491 | - } |
|
492 | - return false; |
|
493 | - } |
|
447 | + /** |
|
448 | + * @param $tickets_added |
|
449 | + * @return bool |
|
450 | + * @throws InvalidInterfaceException |
|
451 | + * @throws InvalidDataTypeException |
|
452 | + * @throws EE_Error |
|
453 | + * @throws InvalidArgumentException |
|
454 | + * @throws ReflectionException |
|
455 | + */ |
|
456 | + private function processSuccessfulCart($tickets_added): bool |
|
457 | + { |
|
458 | + // exit('KILL REDIRECT BEFORE CART UPDATE'); // <<<<<<<<<<<<<<<<< KILL REDIRECT HERE BEFORE CART UPDATE |
|
459 | + if (apply_filters('FHEE__EED_Ticket_Selector__process_ticket_selections__success', $tickets_added)) { |
|
460 | + // make sure cart is loaded |
|
461 | + if (! $this->cart instanceof EE_Cart) { |
|
462 | + $this->cart = CartFactory::getCart(); |
|
463 | + } |
|
464 | + do_action( |
|
465 | + 'FHEE__EE_Ticket_Selector__process_ticket_selections__before_redirecting_to_checkout', |
|
466 | + $this->cart, |
|
467 | + $this |
|
468 | + ); |
|
469 | + $this->cart->recalculate_all_cart_totals(); |
|
470 | + $this->cart->save_cart(false); |
|
471 | + // exit('KILL REDIRECT AFTER CART UPDATE'); // <<<<<<<< OR HERE TO KILL REDIRECT AFTER CART UPDATE |
|
472 | + // just return TRUE for registrations being made from admin |
|
473 | + if ($this->request->isAdmin() || $this->request->isFrontAjax()) { |
|
474 | + return true; |
|
475 | + } |
|
476 | + EEH_URL::safeRedirectAndExit( |
|
477 | + apply_filters( |
|
478 | + 'FHEE__EE_Ticket_Selector__process_ticket_selections__success_redirect_url', |
|
479 | + $this->core_config->reg_page_url() |
|
480 | + ) |
|
481 | + ); |
|
482 | + } |
|
483 | + if (! EE_Error::has_error() && ! EE_Error::has_error(true, 'attention')) { |
|
484 | + // nothing added to cart |
|
485 | + EE_Error::add_attention( |
|
486 | + esc_html__('No tickets were added for the event', 'event_espresso'), |
|
487 | + __FILE__, |
|
488 | + __FUNCTION__, |
|
489 | + __LINE__ |
|
490 | + ); |
|
491 | + } |
|
492 | + return false; |
|
493 | + } |
|
494 | 494 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | public function cancelTicketSelections(): bool |
102 | 102 | { |
103 | 103 | // check nonce |
104 | - if (! $this->processTicketSelectorNonce()) { |
|
104 | + if ( ! $this->processTicketSelectorNonce()) { |
|
105 | 105 | return false; |
106 | 106 | } |
107 | 107 | $this->session->clear_session(__CLASS__, __FUNCTION__); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | ); |
114 | 114 | } |
115 | 115 | EEH_URL::safeRedirectAndExit( |
116 | - site_url('/' . $this->core_config->event_cpt_slug . '/') |
|
116 | + site_url('/'.$this->core_config->event_cpt_slug.'/') |
|
117 | 117 | ); |
118 | 118 | return true; |
119 | 119 | } |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | if ($this->request->isAdmin() || $this->request->isFrontAjax()) { |
203 | 203 | return false; |
204 | 204 | } |
205 | - if (! empty($valid['return_url'])) { |
|
205 | + if ( ! empty($valid['return_url'])) { |
|
206 | 206 | EEH_URL::safeRedirectAndExit($valid['return_url']); |
207 | 207 | } |
208 | 208 | // do we have an event id? |
@@ -244,8 +244,8 @@ discard block |
||
244 | 244 | 'event_espresso' |
245 | 245 | ) |
246 | 246 | ); |
247 | - $limit_error_2 = sprintf($max_attendees_string, $valid['max_atndz'], $valid['max_atndz']); |
|
248 | - EE_Error::add_error($limit_error_1 . '<br/>' . $limit_error_2, __FILE__, __FUNCTION__, __LINE__); |
|
247 | + $limit_error_2 = sprintf($max_attendees_string, $valid['max_atndz'], $valid['max_atndz']); |
|
248 | + EE_Error::add_error($limit_error_1.'<br/>'.$limit_error_2, __FILE__, __FUNCTION__, __LINE__); |
|
249 | 249 | return true; |
250 | 250 | } |
251 | 251 | |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | } |
267 | 267 | $tickets_added = 0; |
268 | 268 | $tickets_selected = false; |
269 | - if (! empty($valid['ticket-selections']) && $valid['total_tickets'] > 0) { |
|
269 | + if ( ! empty($valid['ticket-selections']) && $valid['total_tickets'] > 0) { |
|
270 | 270 | // load cart using factory because we don't want to do so until actually needed |
271 | 271 | $this->cart = CartFactory::getCart(); |
272 | 272 | // if the user is an admin that can edit registrations, |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | $this->cart, |
297 | 297 | $this |
298 | 298 | ); |
299 | - if (! apply_filters('FHEE__EED_Ticket_Selector__process_ticket_selections__tckts_slctd', $tickets_selected)) { |
|
299 | + if ( ! apply_filters('FHEE__EED_Ticket_Selector__process_ticket_selections__tckts_slctd', $tickets_selected)) { |
|
300 | 300 | // no ticket quantities were selected |
301 | 301 | EE_Error::add_error( |
302 | 302 | esc_html__('You need to select a ticket quantity before you can proceed.', 'event_espresso'), |
@@ -458,7 +458,7 @@ discard block |
||
458 | 458 | // exit('KILL REDIRECT BEFORE CART UPDATE'); // <<<<<<<<<<<<<<<<< KILL REDIRECT HERE BEFORE CART UPDATE |
459 | 459 | if (apply_filters('FHEE__EED_Ticket_Selector__process_ticket_selections__success', $tickets_added)) { |
460 | 460 | // make sure cart is loaded |
461 | - if (! $this->cart instanceof EE_Cart) { |
|
461 | + if ( ! $this->cart instanceof EE_Cart) { |
|
462 | 462 | $this->cart = CartFactory::getCart(); |
463 | 463 | } |
464 | 464 | do_action( |
@@ -480,7 +480,7 @@ discard block |
||
480 | 480 | ) |
481 | 481 | ); |
482 | 482 | } |
483 | - if (! EE_Error::has_error() && ! EE_Error::has_error(true, 'attention')) { |
|
483 | + if ( ! EE_Error::has_error() && ! EE_Error::has_error(true, 'attention')) { |
|
484 | 484 | // nothing added to cart |
485 | 485 | EE_Error::add_attention( |
486 | 486 | esc_html__('No tickets were added for the event', 'event_espresso'), |
@@ -42,864 +42,864 @@ |
||
42 | 42 | */ |
43 | 43 | class DisplayTicketSelector |
44 | 44 | { |
45 | - private CurrentUser $current_user; |
|
46 | - |
|
47 | - protected RequestInterface $request; |
|
48 | - |
|
49 | - protected EE_Ticket_Selector_Config $config; |
|
50 | - |
|
51 | - /** |
|
52 | - * event that ticket selector is being generated for |
|
53 | - * |
|
54 | - * @var EE_Event|null $event |
|
55 | - */ |
|
56 | - protected ?EE_Event $event = null; |
|
57 | - |
|
58 | - /** |
|
59 | - * Used to flag when the ticket selector is being called from an external iframe. |
|
60 | - * |
|
61 | - * @var bool $iframe |
|
62 | - */ |
|
63 | - protected bool $iframe = false; |
|
64 | - |
|
65 | - /** |
|
66 | - * max attendees that can register for event at one time |
|
67 | - * |
|
68 | - * @var int|float $max_attendees |
|
69 | - */ |
|
70 | - private $max_attendees = EE_INF; |
|
71 | - |
|
72 | - /** |
|
73 | - * @var string $date_format |
|
74 | - */ |
|
75 | - private string $date_format; |
|
76 | - |
|
77 | - /** |
|
78 | - * @var string $time_format |
|
79 | - */ |
|
80 | - private string $time_format; |
|
81 | - |
|
82 | - private ?bool $display_full_ui = null; |
|
83 | - |
|
84 | - |
|
85 | - /** |
|
86 | - * DisplayTicketSelector constructor. |
|
87 | - * |
|
88 | - * @param CurrentUser $current_user |
|
89 | - * @param RequestInterface $request |
|
90 | - * @param EE_Ticket_Selector_Config $config |
|
91 | - * @param bool $iframe |
|
92 | - */ |
|
93 | - public function __construct( |
|
94 | - CurrentUser $current_user, |
|
95 | - RequestInterface $request, |
|
96 | - EE_Ticket_Selector_Config $config, |
|
97 | - bool $iframe = false |
|
98 | - ) { |
|
99 | - $this->current_user = $current_user; |
|
100 | - $this->request = $request; |
|
101 | - $this->config = $config; |
|
102 | - $this->setIframe($iframe); |
|
103 | - $this->date_format = apply_filters( |
|
104 | - 'FHEE__EED_Ticket_Selector__display_ticket_selector__date_format', |
|
105 | - (string) get_option('date_format') |
|
106 | - ); |
|
107 | - $this->time_format = apply_filters( |
|
108 | - 'FHEE__EED_Ticket_Selector__display_ticket_selector__time_format', |
|
109 | - (string) get_option('time_format') |
|
110 | - ); |
|
111 | - } |
|
112 | - |
|
113 | - |
|
114 | - /** |
|
115 | - * @return bool |
|
116 | - */ |
|
117 | - public function isIframe(): bool |
|
118 | - { |
|
119 | - return $this->iframe; |
|
120 | - } |
|
121 | - |
|
122 | - |
|
123 | - /** |
|
124 | - * @param boolean $iframe |
|
125 | - */ |
|
126 | - public function setIframe(bool $iframe = true) |
|
127 | - { |
|
128 | - $this->iframe = filter_var($iframe, FILTER_VALIDATE_BOOLEAN); |
|
129 | - } |
|
130 | - |
|
131 | - |
|
132 | - /** |
|
133 | - * finds and sets the \EE_Event object for use throughout class |
|
134 | - * |
|
135 | - * @param mixed $event |
|
136 | - * @return bool |
|
137 | - * @throws EE_Error |
|
138 | - * @throws ReflectionException |
|
139 | - */ |
|
140 | - protected function setEvent($event = null): bool |
|
141 | - { |
|
142 | - global $post; |
|
143 | - if ($event === null) { |
|
144 | - $event = $post; |
|
145 | - } |
|
146 | - if ($event instanceof EE_Event) { |
|
147 | - $this->event = $event; |
|
148 | - return true; |
|
149 | - } |
|
150 | - if ($event instanceof WP_Post) { |
|
151 | - if ( |
|
152 | - isset($event->EE_Event) |
|
153 | - && $event->EE_Event instanceof EE_Event |
|
154 | - && ( ! $post instanceof WP_Post || $post->ID === $event->EE_Event->ID() ) |
|
155 | - ) { |
|
156 | - $this->event = $event->EE_Event; |
|
157 | - return true; |
|
158 | - } |
|
159 | - if (isset($event->post_type) && $event->post_type === EspressoPostType::EVENTS) { |
|
160 | - $event->EE_Event = EEM_Event::instance()->instantiate_class_from_post_object($event); |
|
161 | - $this->event = $event->EE_Event; |
|
162 | - return true; |
|
163 | - } |
|
164 | - } |
|
165 | - $user_msg = esc_html__('No Event object or an invalid Event object was supplied.', 'event_espresso'); |
|
166 | - $dev_msg = $user_msg . esc_html__( |
|
167 | - 'In order to generate a ticket selector, please ensure you are passing either an EE_Event object or a WP_Post object of the post type "espresso_event" to the EE_Ticket_Selector class constructor.', |
|
168 | - 'event_espresso' |
|
169 | - ); |
|
170 | - EE_Error::add_error($user_msg . '||' . $dev_msg, __FILE__, __FUNCTION__, __LINE__); |
|
171 | - return false; |
|
172 | - } |
|
173 | - |
|
174 | - |
|
175 | - /** |
|
176 | - * @return int |
|
177 | - */ |
|
178 | - public function getMaxAttendees(): int |
|
179 | - { |
|
180 | - return $this->max_attendees; |
|
181 | - } |
|
182 | - |
|
183 | - |
|
184 | - /** |
|
185 | - * @param int $max_attendees |
|
186 | - */ |
|
187 | - public function setMaxAttendees(int $max_attendees) |
|
188 | - { |
|
189 | - $this->max_attendees = absint( |
|
190 | - apply_filters( |
|
191 | - 'FHEE__EE_Ticket_Selector__display_ticket_selector__max_tickets', |
|
192 | - $max_attendees |
|
193 | - ) |
|
194 | - ); |
|
195 | - } |
|
196 | - |
|
197 | - |
|
198 | - /** |
|
199 | - * Returns whether the full ticket selector should be shown or not. |
|
200 | - * Currently, it displays on the frontend (including ajax requests) but not the backend |
|
201 | - * |
|
202 | - * @return bool |
|
203 | - */ |
|
204 | - private function display_full_ui(): bool |
|
205 | - { |
|
206 | - if ($this->display_full_ui === null) { |
|
207 | - $this->display_full_ui = ! is_admin() || (defined('DOING_AJAX') && DOING_AJAX); |
|
208 | - } |
|
209 | - return $this->display_full_ui; |
|
210 | - } |
|
211 | - |
|
212 | - |
|
213 | - /** |
|
214 | - * creates buttons for selecting number of attendees for an event |
|
215 | - * |
|
216 | - * @param WP_Post|int $event |
|
217 | - * @param bool $view_details |
|
218 | - * @return string |
|
219 | - * @throws EE_Error |
|
220 | - * @throws ReflectionException |
|
221 | - * @throws Exception |
|
222 | - * @throws Throwable |
|
223 | - */ |
|
224 | - public function display($event = null, bool $view_details = false): string |
|
225 | - { |
|
226 | - // reset filter for displaying submit button |
|
227 | - remove_filter('FHEE__EE_Ticket_Selector__display_ticket_selector_submit', '__return_true'); |
|
228 | - // poke and prod incoming event till it tells us what it is |
|
229 | - if (! $this->setEvent($event)) { |
|
230 | - return $this->handleMissingEvent(); |
|
231 | - } |
|
232 | - // is the event expired ? |
|
233 | - $template_args['event_is_expired'] = ! is_admin() && $this->event->is_expired(); |
|
234 | - if ($template_args['event_is_expired']) { |
|
235 | - return is_single() |
|
236 | - ? $this->expiredEventMessage() |
|
237 | - : $this->expiredEventMessage() . $this->displayViewDetailsButton(); |
|
238 | - } |
|
239 | - // begin gathering template arguments by getting event status |
|
240 | - $template_args = ['event_status' => $this->event->get_active_status()]; |
|
241 | - if ( |
|
242 | - $this->activeEventAndShowTicketSelector( |
|
243 | - $event, |
|
244 | - $template_args['event_status'], |
|
245 | - $view_details |
|
246 | - ) |
|
247 | - ) { |
|
248 | - return ! is_single() ? $this->displayViewDetailsButton() : ''; |
|
249 | - } |
|
250 | - // filter the maximum qty that can appear in the Ticket Selector qty dropdowns |
|
251 | - $this->setMaxAttendees($this->event->additional_limit()); |
|
252 | - if ($this->getMaxAttendees() < 1) { |
|
253 | - return $this->ticketSalesClosedMessage(); |
|
254 | - } |
|
255 | - // get all tickets for this event ordered by the datetime |
|
256 | - $tickets = $this->getTickets(); |
|
257 | - if (count($tickets) < 1) { |
|
258 | - return $this->noTicketAvailableMessage(); |
|
259 | - } |
|
260 | - // redirecting to another site for registration ?? |
|
261 | - $external_url = (string) $this->event->external_url() |
|
262 | - && $this->event->external_url() !== get_the_permalink() |
|
263 | - ? $this->event->external_url() |
|
264 | - : ''; |
|
265 | - // if redirecting to another site for registration, then we don't load the TS |
|
266 | - $ticket_selector = $external_url |
|
267 | - ? $this->externalEventRegistration() |
|
268 | - : $this->loadTicketSelector($tickets, $template_args); |
|
269 | - // now set up the form (but not for the admin) |
|
270 | - $ticket_selector = $this->display_full_ui() |
|
271 | - ? $this->formOpen($this->event->ID(), $external_url) . $ticket_selector |
|
272 | - : $ticket_selector; |
|
273 | - // submit button and form close tag |
|
274 | - $ticket_selector .= $this->display_full_ui() ? $this->displaySubmitButton($external_url) : ''; |
|
275 | - return $ticket_selector; |
|
276 | - } |
|
277 | - |
|
278 | - |
|
279 | - /** |
|
280 | - * displayTicketSelector |
|
281 | - * examines the event properties and determines whether a Ticket Selector should be displayed |
|
282 | - * |
|
283 | - * @param WP_Post|int $event |
|
284 | - * @param string $_event_active_status |
|
285 | - * @param bool $view_details |
|
286 | - * @return bool |
|
287 | - * @throws EE_Error |
|
288 | - * @throws ReflectionException |
|
289 | - */ |
|
290 | - protected function activeEventAndShowTicketSelector($event, string $_event_active_status, bool $view_details): bool |
|
291 | - { |
|
292 | - $event_post = $this->event instanceof EE_Event ? $this->event->ID() : $event; |
|
293 | - return $this->display_full_ui() |
|
294 | - && ( |
|
295 | - ! $this->event->display_ticket_selector() |
|
296 | - || $view_details |
|
297 | - || post_password_required($event_post) |
|
298 | - || ( |
|
299 | - $_event_active_status !== EE_Datetime::active |
|
300 | - && $_event_active_status !== EE_Datetime::upcoming |
|
301 | - && $_event_active_status !== EE_Datetime::sold_out |
|
302 | - && ! ( |
|
303 | - $_event_active_status === EE_Datetime::inactive |
|
304 | - && is_user_logged_in() |
|
305 | - ) |
|
306 | - ) |
|
307 | - ); |
|
308 | - } |
|
309 | - |
|
310 | - |
|
311 | - /** |
|
312 | - * noTicketAvailableMessage |
|
313 | - * notice displayed if event is expired |
|
314 | - * |
|
315 | - * @return string |
|
316 | - */ |
|
317 | - protected function expiredEventMessage(): string |
|
318 | - { |
|
319 | - return '<div class="ee-event-expired-notice"><span class="important-notice">' |
|
320 | - . esc_html__( |
|
321 | - 'We\'re sorry, but all tickets sales have ended because the event is expired.', |
|
322 | - 'event_espresso' |
|
323 | - ) |
|
324 | - . '</span></div><!-- .ee-event-expired-notice -->'; |
|
325 | - } |
|
326 | - |
|
327 | - |
|
328 | - /** |
|
329 | - * noTicketAvailableMessage |
|
330 | - * notice displayed if event has no more tickets available |
|
331 | - * |
|
332 | - * @return string |
|
333 | - * @throws EE_Error |
|
334 | - * @throws ReflectionException |
|
335 | - */ |
|
336 | - protected function noTicketAvailableMessage(): string |
|
337 | - { |
|
338 | - $no_ticket_available_msg = esc_html__('We\'re sorry, but all ticket sales have ended.', 'event_espresso'); |
|
339 | - if (current_user_can('edit_post', $this->event->ID())) { |
|
340 | - $no_ticket_available_msg .= sprintf( |
|
341 | - esc_html__( |
|
342 | - '%1$sNote to Event Admin:%2$sNo tickets were found for this event. This effectively turns off ticket sales. Please ensure that at least one ticket is available for if you want people to be able to register.%3$s(click to edit this event)%4$s', |
|
343 | - 'event_espresso' |
|
344 | - ), |
|
345 | - '<div class="ee-attention" style="text-align: left;"><b>', |
|
346 | - '</b><br />', |
|
347 | - '<span class="edit-link"><a class="post-edit-link" href="' |
|
348 | - . get_edit_post_link($this->event->ID()) |
|
349 | - . '">', |
|
350 | - '</a></span></div><!-- .ee-attention noTicketAvailableMessage -->' |
|
351 | - ); |
|
352 | - } |
|
353 | - return ' |
|
45 | + private CurrentUser $current_user; |
|
46 | + |
|
47 | + protected RequestInterface $request; |
|
48 | + |
|
49 | + protected EE_Ticket_Selector_Config $config; |
|
50 | + |
|
51 | + /** |
|
52 | + * event that ticket selector is being generated for |
|
53 | + * |
|
54 | + * @var EE_Event|null $event |
|
55 | + */ |
|
56 | + protected ?EE_Event $event = null; |
|
57 | + |
|
58 | + /** |
|
59 | + * Used to flag when the ticket selector is being called from an external iframe. |
|
60 | + * |
|
61 | + * @var bool $iframe |
|
62 | + */ |
|
63 | + protected bool $iframe = false; |
|
64 | + |
|
65 | + /** |
|
66 | + * max attendees that can register for event at one time |
|
67 | + * |
|
68 | + * @var int|float $max_attendees |
|
69 | + */ |
|
70 | + private $max_attendees = EE_INF; |
|
71 | + |
|
72 | + /** |
|
73 | + * @var string $date_format |
|
74 | + */ |
|
75 | + private string $date_format; |
|
76 | + |
|
77 | + /** |
|
78 | + * @var string $time_format |
|
79 | + */ |
|
80 | + private string $time_format; |
|
81 | + |
|
82 | + private ?bool $display_full_ui = null; |
|
83 | + |
|
84 | + |
|
85 | + /** |
|
86 | + * DisplayTicketSelector constructor. |
|
87 | + * |
|
88 | + * @param CurrentUser $current_user |
|
89 | + * @param RequestInterface $request |
|
90 | + * @param EE_Ticket_Selector_Config $config |
|
91 | + * @param bool $iframe |
|
92 | + */ |
|
93 | + public function __construct( |
|
94 | + CurrentUser $current_user, |
|
95 | + RequestInterface $request, |
|
96 | + EE_Ticket_Selector_Config $config, |
|
97 | + bool $iframe = false |
|
98 | + ) { |
|
99 | + $this->current_user = $current_user; |
|
100 | + $this->request = $request; |
|
101 | + $this->config = $config; |
|
102 | + $this->setIframe($iframe); |
|
103 | + $this->date_format = apply_filters( |
|
104 | + 'FHEE__EED_Ticket_Selector__display_ticket_selector__date_format', |
|
105 | + (string) get_option('date_format') |
|
106 | + ); |
|
107 | + $this->time_format = apply_filters( |
|
108 | + 'FHEE__EED_Ticket_Selector__display_ticket_selector__time_format', |
|
109 | + (string) get_option('time_format') |
|
110 | + ); |
|
111 | + } |
|
112 | + |
|
113 | + |
|
114 | + /** |
|
115 | + * @return bool |
|
116 | + */ |
|
117 | + public function isIframe(): bool |
|
118 | + { |
|
119 | + return $this->iframe; |
|
120 | + } |
|
121 | + |
|
122 | + |
|
123 | + /** |
|
124 | + * @param boolean $iframe |
|
125 | + */ |
|
126 | + public function setIframe(bool $iframe = true) |
|
127 | + { |
|
128 | + $this->iframe = filter_var($iframe, FILTER_VALIDATE_BOOLEAN); |
|
129 | + } |
|
130 | + |
|
131 | + |
|
132 | + /** |
|
133 | + * finds and sets the \EE_Event object for use throughout class |
|
134 | + * |
|
135 | + * @param mixed $event |
|
136 | + * @return bool |
|
137 | + * @throws EE_Error |
|
138 | + * @throws ReflectionException |
|
139 | + */ |
|
140 | + protected function setEvent($event = null): bool |
|
141 | + { |
|
142 | + global $post; |
|
143 | + if ($event === null) { |
|
144 | + $event = $post; |
|
145 | + } |
|
146 | + if ($event instanceof EE_Event) { |
|
147 | + $this->event = $event; |
|
148 | + return true; |
|
149 | + } |
|
150 | + if ($event instanceof WP_Post) { |
|
151 | + if ( |
|
152 | + isset($event->EE_Event) |
|
153 | + && $event->EE_Event instanceof EE_Event |
|
154 | + && ( ! $post instanceof WP_Post || $post->ID === $event->EE_Event->ID() ) |
|
155 | + ) { |
|
156 | + $this->event = $event->EE_Event; |
|
157 | + return true; |
|
158 | + } |
|
159 | + if (isset($event->post_type) && $event->post_type === EspressoPostType::EVENTS) { |
|
160 | + $event->EE_Event = EEM_Event::instance()->instantiate_class_from_post_object($event); |
|
161 | + $this->event = $event->EE_Event; |
|
162 | + return true; |
|
163 | + } |
|
164 | + } |
|
165 | + $user_msg = esc_html__('No Event object or an invalid Event object was supplied.', 'event_espresso'); |
|
166 | + $dev_msg = $user_msg . esc_html__( |
|
167 | + 'In order to generate a ticket selector, please ensure you are passing either an EE_Event object or a WP_Post object of the post type "espresso_event" to the EE_Ticket_Selector class constructor.', |
|
168 | + 'event_espresso' |
|
169 | + ); |
|
170 | + EE_Error::add_error($user_msg . '||' . $dev_msg, __FILE__, __FUNCTION__, __LINE__); |
|
171 | + return false; |
|
172 | + } |
|
173 | + |
|
174 | + |
|
175 | + /** |
|
176 | + * @return int |
|
177 | + */ |
|
178 | + public function getMaxAttendees(): int |
|
179 | + { |
|
180 | + return $this->max_attendees; |
|
181 | + } |
|
182 | + |
|
183 | + |
|
184 | + /** |
|
185 | + * @param int $max_attendees |
|
186 | + */ |
|
187 | + public function setMaxAttendees(int $max_attendees) |
|
188 | + { |
|
189 | + $this->max_attendees = absint( |
|
190 | + apply_filters( |
|
191 | + 'FHEE__EE_Ticket_Selector__display_ticket_selector__max_tickets', |
|
192 | + $max_attendees |
|
193 | + ) |
|
194 | + ); |
|
195 | + } |
|
196 | + |
|
197 | + |
|
198 | + /** |
|
199 | + * Returns whether the full ticket selector should be shown or not. |
|
200 | + * Currently, it displays on the frontend (including ajax requests) but not the backend |
|
201 | + * |
|
202 | + * @return bool |
|
203 | + */ |
|
204 | + private function display_full_ui(): bool |
|
205 | + { |
|
206 | + if ($this->display_full_ui === null) { |
|
207 | + $this->display_full_ui = ! is_admin() || (defined('DOING_AJAX') && DOING_AJAX); |
|
208 | + } |
|
209 | + return $this->display_full_ui; |
|
210 | + } |
|
211 | + |
|
212 | + |
|
213 | + /** |
|
214 | + * creates buttons for selecting number of attendees for an event |
|
215 | + * |
|
216 | + * @param WP_Post|int $event |
|
217 | + * @param bool $view_details |
|
218 | + * @return string |
|
219 | + * @throws EE_Error |
|
220 | + * @throws ReflectionException |
|
221 | + * @throws Exception |
|
222 | + * @throws Throwable |
|
223 | + */ |
|
224 | + public function display($event = null, bool $view_details = false): string |
|
225 | + { |
|
226 | + // reset filter for displaying submit button |
|
227 | + remove_filter('FHEE__EE_Ticket_Selector__display_ticket_selector_submit', '__return_true'); |
|
228 | + // poke and prod incoming event till it tells us what it is |
|
229 | + if (! $this->setEvent($event)) { |
|
230 | + return $this->handleMissingEvent(); |
|
231 | + } |
|
232 | + // is the event expired ? |
|
233 | + $template_args['event_is_expired'] = ! is_admin() && $this->event->is_expired(); |
|
234 | + if ($template_args['event_is_expired']) { |
|
235 | + return is_single() |
|
236 | + ? $this->expiredEventMessage() |
|
237 | + : $this->expiredEventMessage() . $this->displayViewDetailsButton(); |
|
238 | + } |
|
239 | + // begin gathering template arguments by getting event status |
|
240 | + $template_args = ['event_status' => $this->event->get_active_status()]; |
|
241 | + if ( |
|
242 | + $this->activeEventAndShowTicketSelector( |
|
243 | + $event, |
|
244 | + $template_args['event_status'], |
|
245 | + $view_details |
|
246 | + ) |
|
247 | + ) { |
|
248 | + return ! is_single() ? $this->displayViewDetailsButton() : ''; |
|
249 | + } |
|
250 | + // filter the maximum qty that can appear in the Ticket Selector qty dropdowns |
|
251 | + $this->setMaxAttendees($this->event->additional_limit()); |
|
252 | + if ($this->getMaxAttendees() < 1) { |
|
253 | + return $this->ticketSalesClosedMessage(); |
|
254 | + } |
|
255 | + // get all tickets for this event ordered by the datetime |
|
256 | + $tickets = $this->getTickets(); |
|
257 | + if (count($tickets) < 1) { |
|
258 | + return $this->noTicketAvailableMessage(); |
|
259 | + } |
|
260 | + // redirecting to another site for registration ?? |
|
261 | + $external_url = (string) $this->event->external_url() |
|
262 | + && $this->event->external_url() !== get_the_permalink() |
|
263 | + ? $this->event->external_url() |
|
264 | + : ''; |
|
265 | + // if redirecting to another site for registration, then we don't load the TS |
|
266 | + $ticket_selector = $external_url |
|
267 | + ? $this->externalEventRegistration() |
|
268 | + : $this->loadTicketSelector($tickets, $template_args); |
|
269 | + // now set up the form (but not for the admin) |
|
270 | + $ticket_selector = $this->display_full_ui() |
|
271 | + ? $this->formOpen($this->event->ID(), $external_url) . $ticket_selector |
|
272 | + : $ticket_selector; |
|
273 | + // submit button and form close tag |
|
274 | + $ticket_selector .= $this->display_full_ui() ? $this->displaySubmitButton($external_url) : ''; |
|
275 | + return $ticket_selector; |
|
276 | + } |
|
277 | + |
|
278 | + |
|
279 | + /** |
|
280 | + * displayTicketSelector |
|
281 | + * examines the event properties and determines whether a Ticket Selector should be displayed |
|
282 | + * |
|
283 | + * @param WP_Post|int $event |
|
284 | + * @param string $_event_active_status |
|
285 | + * @param bool $view_details |
|
286 | + * @return bool |
|
287 | + * @throws EE_Error |
|
288 | + * @throws ReflectionException |
|
289 | + */ |
|
290 | + protected function activeEventAndShowTicketSelector($event, string $_event_active_status, bool $view_details): bool |
|
291 | + { |
|
292 | + $event_post = $this->event instanceof EE_Event ? $this->event->ID() : $event; |
|
293 | + return $this->display_full_ui() |
|
294 | + && ( |
|
295 | + ! $this->event->display_ticket_selector() |
|
296 | + || $view_details |
|
297 | + || post_password_required($event_post) |
|
298 | + || ( |
|
299 | + $_event_active_status !== EE_Datetime::active |
|
300 | + && $_event_active_status !== EE_Datetime::upcoming |
|
301 | + && $_event_active_status !== EE_Datetime::sold_out |
|
302 | + && ! ( |
|
303 | + $_event_active_status === EE_Datetime::inactive |
|
304 | + && is_user_logged_in() |
|
305 | + ) |
|
306 | + ) |
|
307 | + ); |
|
308 | + } |
|
309 | + |
|
310 | + |
|
311 | + /** |
|
312 | + * noTicketAvailableMessage |
|
313 | + * notice displayed if event is expired |
|
314 | + * |
|
315 | + * @return string |
|
316 | + */ |
|
317 | + protected function expiredEventMessage(): string |
|
318 | + { |
|
319 | + return '<div class="ee-event-expired-notice"><span class="important-notice">' |
|
320 | + . esc_html__( |
|
321 | + 'We\'re sorry, but all tickets sales have ended because the event is expired.', |
|
322 | + 'event_espresso' |
|
323 | + ) |
|
324 | + . '</span></div><!-- .ee-event-expired-notice -->'; |
|
325 | + } |
|
326 | + |
|
327 | + |
|
328 | + /** |
|
329 | + * noTicketAvailableMessage |
|
330 | + * notice displayed if event has no more tickets available |
|
331 | + * |
|
332 | + * @return string |
|
333 | + * @throws EE_Error |
|
334 | + * @throws ReflectionException |
|
335 | + */ |
|
336 | + protected function noTicketAvailableMessage(): string |
|
337 | + { |
|
338 | + $no_ticket_available_msg = esc_html__('We\'re sorry, but all ticket sales have ended.', 'event_espresso'); |
|
339 | + if (current_user_can('edit_post', $this->event->ID())) { |
|
340 | + $no_ticket_available_msg .= sprintf( |
|
341 | + esc_html__( |
|
342 | + '%1$sNote to Event Admin:%2$sNo tickets were found for this event. This effectively turns off ticket sales. Please ensure that at least one ticket is available for if you want people to be able to register.%3$s(click to edit this event)%4$s', |
|
343 | + 'event_espresso' |
|
344 | + ), |
|
345 | + '<div class="ee-attention" style="text-align: left;"><b>', |
|
346 | + '</b><br />', |
|
347 | + '<span class="edit-link"><a class="post-edit-link" href="' |
|
348 | + . get_edit_post_link($this->event->ID()) |
|
349 | + . '">', |
|
350 | + '</a></span></div><!-- .ee-attention noTicketAvailableMessage -->' |
|
351 | + ); |
|
352 | + } |
|
353 | + return ' |
|
354 | 354 | <div class="ee-event-expired-notice"> |
355 | 355 | <span class="important-notice">' . $no_ticket_available_msg . '</span> |
356 | 356 | </div><!-- .ee-event-expired-notice -->'; |
357 | - } |
|
358 | - |
|
359 | - |
|
360 | - /** |
|
361 | - * ticketSalesClosed |
|
362 | - * notice displayed if event ticket sales are turned off |
|
363 | - * |
|
364 | - * @return string |
|
365 | - * @throws EE_Error |
|
366 | - * @throws ReflectionException |
|
367 | - */ |
|
368 | - protected function ticketSalesClosedMessage(): string |
|
369 | - { |
|
370 | - $sales_closed_msg = esc_html__( |
|
371 | - 'We\'re sorry, but ticket sales have been closed at this time. Please check back again later.', |
|
372 | - 'event_espresso' |
|
373 | - ); |
|
374 | - if (current_user_can('edit_post', $this->event->ID())) { |
|
375 | - $sales_closed_msg .= sprintf( |
|
376 | - esc_html__( |
|
377 | - '%sNote to Event Admin:%sThe "Maximum number of tickets allowed per order for this event" in the Event Registration Options has been set to "0". This effectively turns off ticket sales. %s(click to edit this event)%s', |
|
378 | - 'event_espresso' |
|
379 | - ), |
|
380 | - '<div class="ee-attention" style="text-align: left;"><b>', |
|
381 | - '</b><br />', |
|
382 | - '<span class="edit-link"><a class="post-edit-link" href="' |
|
383 | - . get_edit_post_link($this->event->ID()) |
|
384 | - . '">', |
|
385 | - '</a></span></div><!-- .ee-attention ticketSalesClosedMessage -->' |
|
386 | - ); |
|
387 | - } |
|
388 | - return '<p><span class="important-notice">' . $sales_closed_msg . '</span></p>'; |
|
389 | - } |
|
390 | - |
|
391 | - |
|
392 | - /** |
|
393 | - * getTickets |
|
394 | - * |
|
395 | - * @return EE_Base_Class[]|EE_Ticket[] |
|
396 | - * @throws EE_Error |
|
397 | - * @throws InvalidDataTypeException |
|
398 | - * @throws InvalidInterfaceException |
|
399 | - * @throws InvalidArgumentException |
|
400 | - * @throws ReflectionException |
|
401 | - */ |
|
402 | - protected function getTickets(): array |
|
403 | - { |
|
404 | - $show_expired_tickets = is_admin() || $this->config->show_expired_tickets; |
|
405 | - |
|
406 | - $ticket_query_args = [ |
|
407 | - [ |
|
408 | - 'Datetime.EVT_ID' => $this->event->ID(), |
|
409 | - 'TKT_visibility' => ['>', EEM_Ticket::TICKET_VISIBILITY_NONE_VALUE], |
|
410 | - ], |
|
411 | - 'order_by' => [ |
|
412 | - 'TKT_required' => 'DESC', |
|
413 | - 'TKT_order' => 'ASC', |
|
414 | - 'TKT_start_date' => 'ASC', |
|
415 | - 'TKT_end_date' => 'ASC', |
|
416 | - 'Datetime.DTT_EVT_start' => 'DESC', |
|
417 | - ], |
|
418 | - ]; |
|
419 | - |
|
420 | - $datetime_id = $this->request->getRequestParam('datetime', 0, 'int'); |
|
421 | - if ($datetime_id) { |
|
422 | - $ticket_query_args[0]['Datetime.DTT_ID'] = $datetime_id; |
|
423 | - } |
|
424 | - |
|
425 | - if (! $show_expired_tickets) { |
|
426 | - // use the correct applicable time query depending on what version of core is being run. |
|
427 | - $current_time = method_exists('EEM_Datetime', 'current_time_for_query') |
|
428 | - ? time() |
|
429 | - : current_time('timestamp'); |
|
430 | - $ticket_query_args[0]['TKT_end_date'] = ['>', $current_time]; |
|
431 | - } |
|
432 | - $tickets = EEM_Ticket::instance()->get_all($ticket_query_args); |
|
433 | - // remove tickets based on their visibility and the current user's allowed access (crudely based on roles) |
|
434 | - // and filter the returned results |
|
435 | - $tickets = array_filter($tickets, [$this, 'ticketVisibilityFilter']); |
|
436 | - return (array) apply_filters( |
|
437 | - 'FHEE__EventEspresso_modules_ticketSelector_DisplayTicketSelector__getTickets', |
|
438 | - $tickets, |
|
439 | - $ticket_query_args, |
|
440 | - $this |
|
441 | - ); |
|
442 | - } |
|
443 | - |
|
444 | - |
|
445 | - /** |
|
446 | - * returns true if any of the following is true: |
|
447 | - * - ticket visibility is PUBLIC |
|
448 | - * - ticket visibility is MEMBERS_ONLY and user is logged in |
|
449 | - * - ticket visibility is ADMINS_ONLY when user IS logged in as an admin |
|
450 | - * - ticket visibility is ADMIN_UI_ONLY when ticket selector is being viewed via an admin page UI |
|
451 | - * |
|
452 | - * @param EE_Ticket $ticket |
|
453 | - * @return bool |
|
454 | - * @throws EE_Error |
|
455 | - * @throws ReflectionException |
|
456 | - * @since 5.0.0.p |
|
457 | - */ |
|
458 | - public function ticketVisibilityFilter(EE_Ticket $ticket): bool |
|
459 | - { |
|
460 | - return $ticket->isPublicOnly() |
|
461 | - || ($ticket->isMembersOnly() && $this->current_user->isLoggedIn()) |
|
462 | - || ( |
|
463 | - $ticket->isAdminsOnly() |
|
464 | - && ($this->current_user->isEventManager() || $this->current_user->isSuperAdmin()) |
|
465 | - ) |
|
466 | - || ($ticket->isAdminUiOnly() && is_admin()); |
|
467 | - } |
|
468 | - |
|
469 | - |
|
470 | - /** |
|
471 | - * loadTicketSelector |
|
472 | - * begins to assemble template arguments |
|
473 | - * and decides whether to load a "simple" ticket selector, or the standard |
|
474 | - * |
|
475 | - * @param EE_Ticket[] $tickets |
|
476 | - * @param array $template_args |
|
477 | - * @return TicketSelectorSimple|TicketSelectorStandard |
|
478 | - * @throws EE_Error |
|
479 | - * @throws ReflectionException |
|
480 | - */ |
|
481 | - protected function loadTicketSelector(array $tickets, array $template_args) |
|
482 | - { |
|
483 | - $template_args['event'] = $this->event; |
|
484 | - $template_args['EVT_ID'] = $this->event->ID(); |
|
485 | - $template_args['event_is_expired'] = $this->event->is_expired(); |
|
486 | - $template_args['max_atndz'] = $this->getMaxAttendees(); |
|
487 | - $template_args['date_format'] = $this->date_format; |
|
488 | - $template_args['time_format'] = $this->time_format; |
|
489 | - /** |
|
490 | - * Filters the anchor ID used when redirecting to the Ticket Selector if no quantity selected |
|
491 | - * |
|
492 | - * @param string '#tkt-slctr-tbl-' . $EVT_ID The html ID to anchor to |
|
493 | - * @param int $EVT_ID The Event ID |
|
494 | - * @since 4.9.13 |
|
495 | - */ |
|
496 | - $template_args['anchor_id'] = apply_filters( |
|
497 | - 'FHEE__EE_Ticket_Selector__redirect_anchor_id', |
|
498 | - '#tkt-slctr-tbl-' . $this->event->ID(), |
|
499 | - $this->event->ID() |
|
500 | - ); |
|
501 | - $template_args['tickets'] = $tickets; |
|
502 | - $template_args['ticket_count'] = count($tickets); |
|
503 | - $ticket_selector = $this->simpleTicketSelector($tickets, $template_args); |
|
504 | - if ($ticket_selector instanceof TicketSelectorSimple) { |
|
505 | - return $ticket_selector; |
|
506 | - } |
|
507 | - return new TicketSelectorStandard( |
|
508 | - $this->config, |
|
509 | - $this->getTaxConfig(), |
|
510 | - $this->event, |
|
511 | - $tickets, |
|
512 | - $this->getMaxAttendees(), |
|
513 | - $template_args, |
|
514 | - $this->date_format, |
|
515 | - $this->time_format |
|
516 | - ); |
|
517 | - } |
|
518 | - |
|
519 | - |
|
520 | - /** |
|
521 | - * simpleTicketSelector |
|
522 | - * there's one ticket, and max attendees is set to one, |
|
523 | - * so if the event is free, then this is a "simple" ticket selector |
|
524 | - * a.k.a. "Dude Where's my Ticket Selector?" |
|
525 | - * |
|
526 | - * @param EE_Ticket[] $tickets |
|
527 | - * @param array $template_args |
|
528 | - * @return string |
|
529 | - * @throws EE_Error |
|
530 | - * @throws ReflectionException |
|
531 | - */ |
|
532 | - protected function simpleTicketSelector(array $tickets, array $template_args) |
|
533 | - { |
|
534 | - // if there is only ONE ticket with a max qty of ONE |
|
535 | - if (count($tickets) > 1 || $this->getMaxAttendees() !== 1) { |
|
536 | - return ''; |
|
537 | - } |
|
538 | - /** @var EE_Ticket $ticket */ |
|
539 | - $ticket = reset($tickets); |
|
540 | - // if the ticket is free... then not much need for the ticket selector |
|
541 | - if ( |
|
542 | - apply_filters( |
|
543 | - 'FHEE__ticket_selector_chart_template__hide_ticket_selector', |
|
544 | - $ticket->is_free(), |
|
545 | - $this->event->ID() |
|
546 | - ) |
|
547 | - ) { |
|
548 | - return new TicketSelectorSimple( |
|
549 | - $this->config, |
|
550 | - $this->event, |
|
551 | - $ticket, |
|
552 | - $this->getMaxAttendees(), |
|
553 | - $template_args |
|
554 | - ); |
|
555 | - } |
|
556 | - return ''; |
|
557 | - } |
|
558 | - |
|
559 | - |
|
560 | - /** |
|
561 | - * externalEventRegistration |
|
562 | - * |
|
563 | - * @return string |
|
564 | - */ |
|
565 | - public function externalEventRegistration(): string |
|
566 | - { |
|
567 | - // if not we still need to trigger the display of the submit button |
|
568 | - add_filter('FHEE__EE_Ticket_Selector__display_ticket_selector_submit', '__return_true'); |
|
569 | - // display notice to admin that registration is external |
|
570 | - return $this->display_full_ui() |
|
571 | - ? esc_html__( |
|
572 | - 'Registration is at an external URL for this event.', |
|
573 | - 'event_espresso' |
|
574 | - ) |
|
575 | - : ''; |
|
576 | - } |
|
577 | - |
|
578 | - |
|
579 | - /** |
|
580 | - * formOpen |
|
581 | - * |
|
582 | - * @param int $ID |
|
583 | - * @param string $external_url |
|
584 | - * @return string |
|
585 | - * @throws EE_Error |
|
586 | - * @throws ReflectionException |
|
587 | - */ |
|
588 | - public function formOpen(int $ID = 0, string $external_url = ''): string |
|
589 | - { |
|
590 | - // if redirecting, we don't need any anything else |
|
591 | - if ($external_url) { |
|
592 | - $html = '<form method="GET" '; |
|
593 | - $html .= 'action="' . EEH_URL::refactor_url($external_url) . '" '; |
|
594 | - $html .= 'name="ticket-selector-form-' . $ID . '"'; |
|
595 | - // open link in new window ? |
|
596 | - $html .= apply_filters( |
|
597 | - 'FHEE__EventEspresso_modules_ticket_selector_DisplayTicketSelector__formOpen__external_url_target_blank', |
|
598 | - $this->isIframe(), |
|
599 | - $this |
|
600 | - ) |
|
601 | - ? ' target="_blank"' |
|
602 | - : ''; |
|
603 | - $html .= '>'; |
|
604 | - $query_args = EEH_URL::get_query_string($external_url); |
|
605 | - foreach ((array) $query_args as $query_arg => $value) { |
|
606 | - $html .= '<input type="hidden" name="' . $query_arg . '" value="' . $value . '">'; |
|
607 | - } |
|
608 | - return $html; |
|
609 | - } |
|
610 | - // if there is no submit button, then don't start building a form |
|
611 | - // because the "View Details" button will build its own form |
|
612 | - if (! apply_filters('FHEE__EE_Ticket_Selector__display_ticket_selector_submit', false)) { |
|
613 | - return ''; |
|
614 | - } |
|
615 | - $checkout_url = EEH_Event_View::event_link_url($ID); |
|
616 | - if (! $checkout_url) { |
|
617 | - EE_Error::add_error( |
|
618 | - esc_html__('The URL for the Event Details page could not be retrieved.', 'event_espresso'), |
|
619 | - __FILE__, |
|
620 | - __FUNCTION__, |
|
621 | - __LINE__ |
|
622 | - ); |
|
623 | - } |
|
624 | - // set no cache headers and constants |
|
625 | - EE_System::do_not_cache(); |
|
626 | - $html = '<form method="POST" '; |
|
627 | - $html .= 'action="' . $checkout_url . '" '; |
|
628 | - $html .= 'name="ticket-selector-form-' . $ID . '"'; |
|
629 | - $html .= $this->iframe ? ' target="_blank"' : ''; |
|
630 | - $html .= '>'; |
|
631 | - $html .= '<input type="hidden" name="ee" value="process_ticket_selections">'; |
|
632 | - return apply_filters('FHEE__EE_Ticket_Selector__ticket_selector_form_open__html', $html, $this->event); |
|
633 | - } |
|
634 | - |
|
635 | - |
|
636 | - /** |
|
637 | - * displaySubmitButton |
|
638 | - * |
|
639 | - * @param string $external_url |
|
640 | - * @return string |
|
641 | - * @throws EE_Error |
|
642 | - * @throws ReflectionException |
|
643 | - */ |
|
644 | - public function displaySubmitButton(string $external_url = ''): string |
|
645 | - { |
|
646 | - $html = ''; |
|
647 | - if ($this->display_full_ui()) { |
|
648 | - // standard TS displayed with submit button, ie: "Register Now" |
|
649 | - if (apply_filters('FHEE__EE_Ticket_Selector__display_ticket_selector_submit', false)) { |
|
650 | - $html .= $this->displayRegisterNowButton(); |
|
651 | - $html .= empty($external_url) |
|
652 | - ? $this->ticketSelectorEndDiv() |
|
653 | - : $this->clearTicketSelector(); |
|
654 | - $html .= '<br/>' . $this->formClose(); |
|
655 | - } elseif ($this->getMaxAttendees() === 1) { |
|
656 | - // its a "Dude Where's my Ticket Selector?" (DWMTS) type event (ie: $_max_atndz === 1) |
|
657 | - if ($this->event->is_sold_out()) { |
|
658 | - // then instead of a View Details or Submit button, just display a "Sold Out" message |
|
659 | - $html .= apply_filters( |
|
660 | - 'FHEE__EE_Ticket_Selector__display_ticket_selector_submit__sold_out_msg', |
|
661 | - sprintf( |
|
662 | - esc_html__( |
|
663 | - '%1$s"%2$s" is currently sold out.%4$sPlease check back again later, as spots may become available.%3$s', |
|
664 | - 'event_espresso' |
|
665 | - ), |
|
666 | - '<p class="no-ticket-selector-msg clear-float">', |
|
667 | - $this->event->name(), |
|
668 | - '</p>', |
|
669 | - '<br />' |
|
670 | - ), |
|
671 | - $this->event |
|
672 | - ); |
|
673 | - if ( |
|
674 | - apply_filters( |
|
675 | - 'FHEE__EE_Ticket_Selector__display_ticket_selector_submit__no_tickets_but_display_register_now_button', |
|
676 | - false, |
|
677 | - $this->event |
|
678 | - ) |
|
679 | - ) { |
|
680 | - $html .= $this->displayRegisterNowButton(); |
|
681 | - } |
|
682 | - // sold out DWMTS event, no TS, no submit or view details button, but has additional content |
|
683 | - $html .= $this->ticketSelectorEndDiv(); |
|
684 | - } elseif ( |
|
685 | - apply_filters('FHEE__EE_Ticket_Selector__hide_ticket_selector', false) |
|
686 | - && ! is_single() |
|
687 | - ) { |
|
688 | - // this is a "Dude Where's my Ticket Selector?" (DWMTS) type event, |
|
689 | - // but no tickets are available, so display event's "View Details" button. |
|
690 | - // it is being viewed via somewhere other than a single post |
|
691 | - $html .= $this->displayViewDetailsButton(true); |
|
692 | - } else { |
|
693 | - $html .= $this->ticketSelectorEndDiv(); |
|
694 | - } |
|
695 | - } elseif (is_archive()) { |
|
696 | - // event list, no tickets available so display event's "View Details" button |
|
697 | - $html .= $this->ticketSelectorEndDiv(); |
|
698 | - $html .= $this->displayViewDetailsButton(); |
|
699 | - } else { |
|
700 | - if ( |
|
701 | - apply_filters( |
|
702 | - 'FHEE__EE_Ticket_Selector__display_ticket_selector_submit__no_tickets_but_display_register_now_button', |
|
703 | - false, |
|
704 | - $this->event |
|
705 | - ) |
|
706 | - ) { |
|
707 | - $html .= $this->displayRegisterNowButton(); |
|
708 | - } |
|
709 | - // no submit or view details button, and no additional content |
|
710 | - $html .= $this->ticketSelectorEndDiv(); |
|
711 | - } |
|
712 | - if (! $this->iframe && ! is_archive()) { |
|
713 | - $html .= EEH_Template::powered_by_event_espresso('', '', ['utm_content' => 'ticket_selector']); |
|
714 | - } |
|
715 | - } |
|
716 | - return apply_filters( |
|
717 | - 'FHEE__EventEspresso_modules_ticket_selector_DisplayTicketSelector__displaySubmitButton__html', |
|
718 | - $html, |
|
719 | - $this->event, |
|
720 | - $this |
|
721 | - ); |
|
722 | - } |
|
723 | - |
|
724 | - |
|
725 | - /** |
|
726 | - * @return string |
|
727 | - * @throws EE_Error |
|
728 | - * @throws ReflectionException |
|
729 | - */ |
|
730 | - public function displayRegisterNowButton(): string |
|
731 | - { |
|
732 | - $btn_text = apply_filters( |
|
733 | - 'FHEE__EE_Ticket_Selector__display_ticket_selector_submit__btn_text', |
|
734 | - esc_html__('Register Now', 'event_espresso'), |
|
735 | - $this->event |
|
736 | - ); |
|
737 | - $external_url = (string) $this->event->external_url() |
|
738 | - && $this->event->external_url() !== get_the_permalink() |
|
739 | - ? $this->event->external_url() |
|
740 | - : ''; |
|
741 | - $html = EEH_HTML::div( |
|
742 | - '', |
|
743 | - 'ticket-selector-submit-' . $this->event->ID() . '-btn-wrap', |
|
744 | - 'ticket-selector-submit-btn-wrap' |
|
745 | - ); |
|
746 | - $html .= '<input id="ticket-selector-submit-' . $this->event->ID() . '-btn"'; |
|
747 | - $html .= ' class="ticket-selector-submit-btn '; |
|
748 | - $html .= empty($external_url) ? 'ticket-selector-submit-ajax"' : '"'; |
|
749 | - $html .= ' type="submit" value="' . $btn_text . '" data-ee-disable-after-recaptcha="true" />'; |
|
750 | - $html .= EEH_HTML::divx() . '<!-- .ticket-selector-submit-btn-wrap -->'; |
|
751 | - $html .= apply_filters( |
|
752 | - 'FHEE__EE_Ticket_Selector__after_ticket_selector_submit', |
|
753 | - '', |
|
754 | - $this->event, |
|
755 | - $this->iframe |
|
756 | - ); |
|
757 | - return $html; |
|
758 | - } |
|
759 | - |
|
760 | - |
|
761 | - /** |
|
762 | - * displayViewDetailsButton |
|
763 | - * |
|
764 | - * @param bool $DWMTS indicates a "Dude Where's my Ticket Selector?" (DWMTS) type event |
|
765 | - * (ie: $_max_atndz === 1) where there are no available tickets, |
|
766 | - * either because they are sold out, expired, or not yet on sale. |
|
767 | - * In this case, we need to close the form BEFORE adding any closing divs |
|
768 | - * @return string |
|
769 | - * @throws EE_Error |
|
770 | - * @throws ReflectionException |
|
771 | - */ |
|
772 | - public function displayViewDetailsButton(bool $DWMTS = false): string |
|
773 | - { |
|
774 | - if (! $this->event->get_permalink()) { |
|
775 | - EE_Error::add_error( |
|
776 | - esc_html__('The URL for the Event Details page could not be retrieved.', 'event_espresso'), |
|
777 | - __FILE__, |
|
778 | - __FUNCTION__, |
|
779 | - __LINE__ |
|
780 | - ); |
|
781 | - } |
|
782 | - $view_details_btn = '<form method="GET" action="'; |
|
783 | - $view_details_btn .= apply_filters( |
|
784 | - 'FHEE__EE_Ticket_Selector__display_view_details_btn__btn_url', |
|
785 | - $this->event->get_permalink(), |
|
786 | - $this->event |
|
787 | - ); |
|
788 | - $view_details_btn .= '"'; |
|
789 | - // open link in new window ? |
|
790 | - $view_details_btn .= apply_filters( |
|
791 | - 'FHEE__EventEspresso_modules_ticket_selector_DisplayTicketSelector__displayViewDetailsButton__url_target_blank', |
|
792 | - $this->isIframe(), |
|
793 | - $this |
|
794 | - ) |
|
795 | - ? ' target="_blank"' |
|
796 | - : ''; |
|
797 | - $view_details_btn .= '>'; |
|
798 | - $btn_text = apply_filters( |
|
799 | - 'FHEE__EE_Ticket_Selector__display_view_details_btn__btn_text', |
|
800 | - esc_html__('View Details', 'event_espresso'), |
|
801 | - $this->event |
|
802 | - ); |
|
803 | - $view_details_btn .= '<input id="ticket-selector-submit-' |
|
804 | - . $this->event->ID() |
|
805 | - . '-btn" class="ticket-selector-submit-btn view-details-btn" type="submit" value="' |
|
806 | - . $btn_text |
|
807 | - . '" />'; |
|
808 | - $view_details_btn .= apply_filters('FHEE__EE_Ticket_Selector__after_view_details_btn', '', $this->event); |
|
809 | - if ($DWMTS) { |
|
810 | - $view_details_btn .= $this->formClose(); |
|
811 | - $view_details_btn .= $this->ticketSelectorEndDiv(); |
|
812 | - $view_details_btn .= '<br/>'; |
|
813 | - } else { |
|
814 | - $view_details_btn .= $this->clearTicketSelector(); |
|
815 | - $view_details_btn .= '<br/>'; |
|
816 | - $view_details_btn .= $this->formClose(); |
|
817 | - } |
|
818 | - return $view_details_btn; |
|
819 | - } |
|
820 | - |
|
821 | - |
|
822 | - /** |
|
823 | - * @return string |
|
824 | - */ |
|
825 | - public function ticketSelectorEndDiv(): string |
|
826 | - { |
|
827 | - return $this->clearTicketSelector() . '</div><!-- ticketSelectorEndDiv -->'; |
|
828 | - } |
|
829 | - |
|
830 | - |
|
831 | - /** |
|
832 | - * @return string |
|
833 | - */ |
|
834 | - public function clearTicketSelector(): string |
|
835 | - { |
|
836 | - // standard TS displayed, appears after a "Register Now" or "view Details" button |
|
837 | - return '<div class="clear"></div><!-- clearTicketSelector -->'; |
|
838 | - } |
|
839 | - |
|
840 | - |
|
841 | - /** |
|
842 | - * @access public |
|
843 | - * @return string |
|
844 | - */ |
|
845 | - public function formClose(): string |
|
846 | - { |
|
847 | - return '</form>'; |
|
848 | - } |
|
849 | - |
|
850 | - |
|
851 | - /** |
|
852 | - * handleMissingEvent |
|
853 | - * Returns either false or an error to display when no valid event is passed. |
|
854 | - * |
|
855 | - * @return string |
|
856 | - * @throws ReflectionException |
|
857 | - * @throws Throwable |
|
858 | - */ |
|
859 | - protected function handleMissingEvent(): string |
|
860 | - { |
|
861 | - // If this is not an iFrame request, simply return false. |
|
862 | - if (! $this->isIframe()) { |
|
863 | - return ''; |
|
864 | - } |
|
865 | - // This is an iFrame so return an error. |
|
866 | - // Display stack trace if WP_DEBUG is enabled. |
|
867 | - if (WP_DEBUG === true && current_user_can('edit_pages')) { |
|
868 | - $event_id = $this->request->getRequestParam('event', 0, 'int'); |
|
869 | - new ExceptionStackTraceDisplay( |
|
870 | - new InvalidArgumentException( |
|
871 | - sprintf( |
|
872 | - esc_html__( |
|
873 | - 'A valid Event ID is required to display the ticket selector.%3$sAn Event with an ID of "%1$s" could not be found.%3$sPlease verify that the embed code added to this post\'s content includes an "%2$s" argument and that its value corresponds to a valid Event ID.', |
|
874 | - 'event_espresso' |
|
875 | - ), |
|
876 | - $event_id, |
|
877 | - 'event', |
|
878 | - '<br />' |
|
879 | - ) |
|
880 | - ) |
|
881 | - ); |
|
882 | - return ''; |
|
883 | - } |
|
884 | - // If WP_DEBUG is not enabled, display a message stating the event could not be found. |
|
885 | - return EEH_HTML::p( |
|
886 | - esc_html__( |
|
887 | - 'A valid Event could not be found. Please contact the event administrator for assistance.', |
|
888 | - 'event_espresso' |
|
889 | - ) |
|
890 | - ); |
|
891 | - } |
|
892 | - |
|
893 | - |
|
894 | - /** |
|
895 | - * @return EE_Tax_Config |
|
896 | - * @since 4.10.14.p |
|
897 | - */ |
|
898 | - protected function getTaxConfig(): EE_Tax_Config |
|
899 | - { |
|
900 | - return isset(EE_Registry::instance()->CFG->tax_settings) |
|
901 | - && EE_Registry::instance()->CFG->tax_settings instanceof EE_Tax_Config |
|
902 | - ? EE_Registry::instance()->CFG->tax_settings |
|
903 | - : new EE_Tax_Config(); |
|
904 | - } |
|
357 | + } |
|
358 | + |
|
359 | + |
|
360 | + /** |
|
361 | + * ticketSalesClosed |
|
362 | + * notice displayed if event ticket sales are turned off |
|
363 | + * |
|
364 | + * @return string |
|
365 | + * @throws EE_Error |
|
366 | + * @throws ReflectionException |
|
367 | + */ |
|
368 | + protected function ticketSalesClosedMessage(): string |
|
369 | + { |
|
370 | + $sales_closed_msg = esc_html__( |
|
371 | + 'We\'re sorry, but ticket sales have been closed at this time. Please check back again later.', |
|
372 | + 'event_espresso' |
|
373 | + ); |
|
374 | + if (current_user_can('edit_post', $this->event->ID())) { |
|
375 | + $sales_closed_msg .= sprintf( |
|
376 | + esc_html__( |
|
377 | + '%sNote to Event Admin:%sThe "Maximum number of tickets allowed per order for this event" in the Event Registration Options has been set to "0". This effectively turns off ticket sales. %s(click to edit this event)%s', |
|
378 | + 'event_espresso' |
|
379 | + ), |
|
380 | + '<div class="ee-attention" style="text-align: left;"><b>', |
|
381 | + '</b><br />', |
|
382 | + '<span class="edit-link"><a class="post-edit-link" href="' |
|
383 | + . get_edit_post_link($this->event->ID()) |
|
384 | + . '">', |
|
385 | + '</a></span></div><!-- .ee-attention ticketSalesClosedMessage -->' |
|
386 | + ); |
|
387 | + } |
|
388 | + return '<p><span class="important-notice">' . $sales_closed_msg . '</span></p>'; |
|
389 | + } |
|
390 | + |
|
391 | + |
|
392 | + /** |
|
393 | + * getTickets |
|
394 | + * |
|
395 | + * @return EE_Base_Class[]|EE_Ticket[] |
|
396 | + * @throws EE_Error |
|
397 | + * @throws InvalidDataTypeException |
|
398 | + * @throws InvalidInterfaceException |
|
399 | + * @throws InvalidArgumentException |
|
400 | + * @throws ReflectionException |
|
401 | + */ |
|
402 | + protected function getTickets(): array |
|
403 | + { |
|
404 | + $show_expired_tickets = is_admin() || $this->config->show_expired_tickets; |
|
405 | + |
|
406 | + $ticket_query_args = [ |
|
407 | + [ |
|
408 | + 'Datetime.EVT_ID' => $this->event->ID(), |
|
409 | + 'TKT_visibility' => ['>', EEM_Ticket::TICKET_VISIBILITY_NONE_VALUE], |
|
410 | + ], |
|
411 | + 'order_by' => [ |
|
412 | + 'TKT_required' => 'DESC', |
|
413 | + 'TKT_order' => 'ASC', |
|
414 | + 'TKT_start_date' => 'ASC', |
|
415 | + 'TKT_end_date' => 'ASC', |
|
416 | + 'Datetime.DTT_EVT_start' => 'DESC', |
|
417 | + ], |
|
418 | + ]; |
|
419 | + |
|
420 | + $datetime_id = $this->request->getRequestParam('datetime', 0, 'int'); |
|
421 | + if ($datetime_id) { |
|
422 | + $ticket_query_args[0]['Datetime.DTT_ID'] = $datetime_id; |
|
423 | + } |
|
424 | + |
|
425 | + if (! $show_expired_tickets) { |
|
426 | + // use the correct applicable time query depending on what version of core is being run. |
|
427 | + $current_time = method_exists('EEM_Datetime', 'current_time_for_query') |
|
428 | + ? time() |
|
429 | + : current_time('timestamp'); |
|
430 | + $ticket_query_args[0]['TKT_end_date'] = ['>', $current_time]; |
|
431 | + } |
|
432 | + $tickets = EEM_Ticket::instance()->get_all($ticket_query_args); |
|
433 | + // remove tickets based on their visibility and the current user's allowed access (crudely based on roles) |
|
434 | + // and filter the returned results |
|
435 | + $tickets = array_filter($tickets, [$this, 'ticketVisibilityFilter']); |
|
436 | + return (array) apply_filters( |
|
437 | + 'FHEE__EventEspresso_modules_ticketSelector_DisplayTicketSelector__getTickets', |
|
438 | + $tickets, |
|
439 | + $ticket_query_args, |
|
440 | + $this |
|
441 | + ); |
|
442 | + } |
|
443 | + |
|
444 | + |
|
445 | + /** |
|
446 | + * returns true if any of the following is true: |
|
447 | + * - ticket visibility is PUBLIC |
|
448 | + * - ticket visibility is MEMBERS_ONLY and user is logged in |
|
449 | + * - ticket visibility is ADMINS_ONLY when user IS logged in as an admin |
|
450 | + * - ticket visibility is ADMIN_UI_ONLY when ticket selector is being viewed via an admin page UI |
|
451 | + * |
|
452 | + * @param EE_Ticket $ticket |
|
453 | + * @return bool |
|
454 | + * @throws EE_Error |
|
455 | + * @throws ReflectionException |
|
456 | + * @since 5.0.0.p |
|
457 | + */ |
|
458 | + public function ticketVisibilityFilter(EE_Ticket $ticket): bool |
|
459 | + { |
|
460 | + return $ticket->isPublicOnly() |
|
461 | + || ($ticket->isMembersOnly() && $this->current_user->isLoggedIn()) |
|
462 | + || ( |
|
463 | + $ticket->isAdminsOnly() |
|
464 | + && ($this->current_user->isEventManager() || $this->current_user->isSuperAdmin()) |
|
465 | + ) |
|
466 | + || ($ticket->isAdminUiOnly() && is_admin()); |
|
467 | + } |
|
468 | + |
|
469 | + |
|
470 | + /** |
|
471 | + * loadTicketSelector |
|
472 | + * begins to assemble template arguments |
|
473 | + * and decides whether to load a "simple" ticket selector, or the standard |
|
474 | + * |
|
475 | + * @param EE_Ticket[] $tickets |
|
476 | + * @param array $template_args |
|
477 | + * @return TicketSelectorSimple|TicketSelectorStandard |
|
478 | + * @throws EE_Error |
|
479 | + * @throws ReflectionException |
|
480 | + */ |
|
481 | + protected function loadTicketSelector(array $tickets, array $template_args) |
|
482 | + { |
|
483 | + $template_args['event'] = $this->event; |
|
484 | + $template_args['EVT_ID'] = $this->event->ID(); |
|
485 | + $template_args['event_is_expired'] = $this->event->is_expired(); |
|
486 | + $template_args['max_atndz'] = $this->getMaxAttendees(); |
|
487 | + $template_args['date_format'] = $this->date_format; |
|
488 | + $template_args['time_format'] = $this->time_format; |
|
489 | + /** |
|
490 | + * Filters the anchor ID used when redirecting to the Ticket Selector if no quantity selected |
|
491 | + * |
|
492 | + * @param string '#tkt-slctr-tbl-' . $EVT_ID The html ID to anchor to |
|
493 | + * @param int $EVT_ID The Event ID |
|
494 | + * @since 4.9.13 |
|
495 | + */ |
|
496 | + $template_args['anchor_id'] = apply_filters( |
|
497 | + 'FHEE__EE_Ticket_Selector__redirect_anchor_id', |
|
498 | + '#tkt-slctr-tbl-' . $this->event->ID(), |
|
499 | + $this->event->ID() |
|
500 | + ); |
|
501 | + $template_args['tickets'] = $tickets; |
|
502 | + $template_args['ticket_count'] = count($tickets); |
|
503 | + $ticket_selector = $this->simpleTicketSelector($tickets, $template_args); |
|
504 | + if ($ticket_selector instanceof TicketSelectorSimple) { |
|
505 | + return $ticket_selector; |
|
506 | + } |
|
507 | + return new TicketSelectorStandard( |
|
508 | + $this->config, |
|
509 | + $this->getTaxConfig(), |
|
510 | + $this->event, |
|
511 | + $tickets, |
|
512 | + $this->getMaxAttendees(), |
|
513 | + $template_args, |
|
514 | + $this->date_format, |
|
515 | + $this->time_format |
|
516 | + ); |
|
517 | + } |
|
518 | + |
|
519 | + |
|
520 | + /** |
|
521 | + * simpleTicketSelector |
|
522 | + * there's one ticket, and max attendees is set to one, |
|
523 | + * so if the event is free, then this is a "simple" ticket selector |
|
524 | + * a.k.a. "Dude Where's my Ticket Selector?" |
|
525 | + * |
|
526 | + * @param EE_Ticket[] $tickets |
|
527 | + * @param array $template_args |
|
528 | + * @return string |
|
529 | + * @throws EE_Error |
|
530 | + * @throws ReflectionException |
|
531 | + */ |
|
532 | + protected function simpleTicketSelector(array $tickets, array $template_args) |
|
533 | + { |
|
534 | + // if there is only ONE ticket with a max qty of ONE |
|
535 | + if (count($tickets) > 1 || $this->getMaxAttendees() !== 1) { |
|
536 | + return ''; |
|
537 | + } |
|
538 | + /** @var EE_Ticket $ticket */ |
|
539 | + $ticket = reset($tickets); |
|
540 | + // if the ticket is free... then not much need for the ticket selector |
|
541 | + if ( |
|
542 | + apply_filters( |
|
543 | + 'FHEE__ticket_selector_chart_template__hide_ticket_selector', |
|
544 | + $ticket->is_free(), |
|
545 | + $this->event->ID() |
|
546 | + ) |
|
547 | + ) { |
|
548 | + return new TicketSelectorSimple( |
|
549 | + $this->config, |
|
550 | + $this->event, |
|
551 | + $ticket, |
|
552 | + $this->getMaxAttendees(), |
|
553 | + $template_args |
|
554 | + ); |
|
555 | + } |
|
556 | + return ''; |
|
557 | + } |
|
558 | + |
|
559 | + |
|
560 | + /** |
|
561 | + * externalEventRegistration |
|
562 | + * |
|
563 | + * @return string |
|
564 | + */ |
|
565 | + public function externalEventRegistration(): string |
|
566 | + { |
|
567 | + // if not we still need to trigger the display of the submit button |
|
568 | + add_filter('FHEE__EE_Ticket_Selector__display_ticket_selector_submit', '__return_true'); |
|
569 | + // display notice to admin that registration is external |
|
570 | + return $this->display_full_ui() |
|
571 | + ? esc_html__( |
|
572 | + 'Registration is at an external URL for this event.', |
|
573 | + 'event_espresso' |
|
574 | + ) |
|
575 | + : ''; |
|
576 | + } |
|
577 | + |
|
578 | + |
|
579 | + /** |
|
580 | + * formOpen |
|
581 | + * |
|
582 | + * @param int $ID |
|
583 | + * @param string $external_url |
|
584 | + * @return string |
|
585 | + * @throws EE_Error |
|
586 | + * @throws ReflectionException |
|
587 | + */ |
|
588 | + public function formOpen(int $ID = 0, string $external_url = ''): string |
|
589 | + { |
|
590 | + // if redirecting, we don't need any anything else |
|
591 | + if ($external_url) { |
|
592 | + $html = '<form method="GET" '; |
|
593 | + $html .= 'action="' . EEH_URL::refactor_url($external_url) . '" '; |
|
594 | + $html .= 'name="ticket-selector-form-' . $ID . '"'; |
|
595 | + // open link in new window ? |
|
596 | + $html .= apply_filters( |
|
597 | + 'FHEE__EventEspresso_modules_ticket_selector_DisplayTicketSelector__formOpen__external_url_target_blank', |
|
598 | + $this->isIframe(), |
|
599 | + $this |
|
600 | + ) |
|
601 | + ? ' target="_blank"' |
|
602 | + : ''; |
|
603 | + $html .= '>'; |
|
604 | + $query_args = EEH_URL::get_query_string($external_url); |
|
605 | + foreach ((array) $query_args as $query_arg => $value) { |
|
606 | + $html .= '<input type="hidden" name="' . $query_arg . '" value="' . $value . '">'; |
|
607 | + } |
|
608 | + return $html; |
|
609 | + } |
|
610 | + // if there is no submit button, then don't start building a form |
|
611 | + // because the "View Details" button will build its own form |
|
612 | + if (! apply_filters('FHEE__EE_Ticket_Selector__display_ticket_selector_submit', false)) { |
|
613 | + return ''; |
|
614 | + } |
|
615 | + $checkout_url = EEH_Event_View::event_link_url($ID); |
|
616 | + if (! $checkout_url) { |
|
617 | + EE_Error::add_error( |
|
618 | + esc_html__('The URL for the Event Details page could not be retrieved.', 'event_espresso'), |
|
619 | + __FILE__, |
|
620 | + __FUNCTION__, |
|
621 | + __LINE__ |
|
622 | + ); |
|
623 | + } |
|
624 | + // set no cache headers and constants |
|
625 | + EE_System::do_not_cache(); |
|
626 | + $html = '<form method="POST" '; |
|
627 | + $html .= 'action="' . $checkout_url . '" '; |
|
628 | + $html .= 'name="ticket-selector-form-' . $ID . '"'; |
|
629 | + $html .= $this->iframe ? ' target="_blank"' : ''; |
|
630 | + $html .= '>'; |
|
631 | + $html .= '<input type="hidden" name="ee" value="process_ticket_selections">'; |
|
632 | + return apply_filters('FHEE__EE_Ticket_Selector__ticket_selector_form_open__html', $html, $this->event); |
|
633 | + } |
|
634 | + |
|
635 | + |
|
636 | + /** |
|
637 | + * displaySubmitButton |
|
638 | + * |
|
639 | + * @param string $external_url |
|
640 | + * @return string |
|
641 | + * @throws EE_Error |
|
642 | + * @throws ReflectionException |
|
643 | + */ |
|
644 | + public function displaySubmitButton(string $external_url = ''): string |
|
645 | + { |
|
646 | + $html = ''; |
|
647 | + if ($this->display_full_ui()) { |
|
648 | + // standard TS displayed with submit button, ie: "Register Now" |
|
649 | + if (apply_filters('FHEE__EE_Ticket_Selector__display_ticket_selector_submit', false)) { |
|
650 | + $html .= $this->displayRegisterNowButton(); |
|
651 | + $html .= empty($external_url) |
|
652 | + ? $this->ticketSelectorEndDiv() |
|
653 | + : $this->clearTicketSelector(); |
|
654 | + $html .= '<br/>' . $this->formClose(); |
|
655 | + } elseif ($this->getMaxAttendees() === 1) { |
|
656 | + // its a "Dude Where's my Ticket Selector?" (DWMTS) type event (ie: $_max_atndz === 1) |
|
657 | + if ($this->event->is_sold_out()) { |
|
658 | + // then instead of a View Details or Submit button, just display a "Sold Out" message |
|
659 | + $html .= apply_filters( |
|
660 | + 'FHEE__EE_Ticket_Selector__display_ticket_selector_submit__sold_out_msg', |
|
661 | + sprintf( |
|
662 | + esc_html__( |
|
663 | + '%1$s"%2$s" is currently sold out.%4$sPlease check back again later, as spots may become available.%3$s', |
|
664 | + 'event_espresso' |
|
665 | + ), |
|
666 | + '<p class="no-ticket-selector-msg clear-float">', |
|
667 | + $this->event->name(), |
|
668 | + '</p>', |
|
669 | + '<br />' |
|
670 | + ), |
|
671 | + $this->event |
|
672 | + ); |
|
673 | + if ( |
|
674 | + apply_filters( |
|
675 | + 'FHEE__EE_Ticket_Selector__display_ticket_selector_submit__no_tickets_but_display_register_now_button', |
|
676 | + false, |
|
677 | + $this->event |
|
678 | + ) |
|
679 | + ) { |
|
680 | + $html .= $this->displayRegisterNowButton(); |
|
681 | + } |
|
682 | + // sold out DWMTS event, no TS, no submit or view details button, but has additional content |
|
683 | + $html .= $this->ticketSelectorEndDiv(); |
|
684 | + } elseif ( |
|
685 | + apply_filters('FHEE__EE_Ticket_Selector__hide_ticket_selector', false) |
|
686 | + && ! is_single() |
|
687 | + ) { |
|
688 | + // this is a "Dude Where's my Ticket Selector?" (DWMTS) type event, |
|
689 | + // but no tickets are available, so display event's "View Details" button. |
|
690 | + // it is being viewed via somewhere other than a single post |
|
691 | + $html .= $this->displayViewDetailsButton(true); |
|
692 | + } else { |
|
693 | + $html .= $this->ticketSelectorEndDiv(); |
|
694 | + } |
|
695 | + } elseif (is_archive()) { |
|
696 | + // event list, no tickets available so display event's "View Details" button |
|
697 | + $html .= $this->ticketSelectorEndDiv(); |
|
698 | + $html .= $this->displayViewDetailsButton(); |
|
699 | + } else { |
|
700 | + if ( |
|
701 | + apply_filters( |
|
702 | + 'FHEE__EE_Ticket_Selector__display_ticket_selector_submit__no_tickets_but_display_register_now_button', |
|
703 | + false, |
|
704 | + $this->event |
|
705 | + ) |
|
706 | + ) { |
|
707 | + $html .= $this->displayRegisterNowButton(); |
|
708 | + } |
|
709 | + // no submit or view details button, and no additional content |
|
710 | + $html .= $this->ticketSelectorEndDiv(); |
|
711 | + } |
|
712 | + if (! $this->iframe && ! is_archive()) { |
|
713 | + $html .= EEH_Template::powered_by_event_espresso('', '', ['utm_content' => 'ticket_selector']); |
|
714 | + } |
|
715 | + } |
|
716 | + return apply_filters( |
|
717 | + 'FHEE__EventEspresso_modules_ticket_selector_DisplayTicketSelector__displaySubmitButton__html', |
|
718 | + $html, |
|
719 | + $this->event, |
|
720 | + $this |
|
721 | + ); |
|
722 | + } |
|
723 | + |
|
724 | + |
|
725 | + /** |
|
726 | + * @return string |
|
727 | + * @throws EE_Error |
|
728 | + * @throws ReflectionException |
|
729 | + */ |
|
730 | + public function displayRegisterNowButton(): string |
|
731 | + { |
|
732 | + $btn_text = apply_filters( |
|
733 | + 'FHEE__EE_Ticket_Selector__display_ticket_selector_submit__btn_text', |
|
734 | + esc_html__('Register Now', 'event_espresso'), |
|
735 | + $this->event |
|
736 | + ); |
|
737 | + $external_url = (string) $this->event->external_url() |
|
738 | + && $this->event->external_url() !== get_the_permalink() |
|
739 | + ? $this->event->external_url() |
|
740 | + : ''; |
|
741 | + $html = EEH_HTML::div( |
|
742 | + '', |
|
743 | + 'ticket-selector-submit-' . $this->event->ID() . '-btn-wrap', |
|
744 | + 'ticket-selector-submit-btn-wrap' |
|
745 | + ); |
|
746 | + $html .= '<input id="ticket-selector-submit-' . $this->event->ID() . '-btn"'; |
|
747 | + $html .= ' class="ticket-selector-submit-btn '; |
|
748 | + $html .= empty($external_url) ? 'ticket-selector-submit-ajax"' : '"'; |
|
749 | + $html .= ' type="submit" value="' . $btn_text . '" data-ee-disable-after-recaptcha="true" />'; |
|
750 | + $html .= EEH_HTML::divx() . '<!-- .ticket-selector-submit-btn-wrap -->'; |
|
751 | + $html .= apply_filters( |
|
752 | + 'FHEE__EE_Ticket_Selector__after_ticket_selector_submit', |
|
753 | + '', |
|
754 | + $this->event, |
|
755 | + $this->iframe |
|
756 | + ); |
|
757 | + return $html; |
|
758 | + } |
|
759 | + |
|
760 | + |
|
761 | + /** |
|
762 | + * displayViewDetailsButton |
|
763 | + * |
|
764 | + * @param bool $DWMTS indicates a "Dude Where's my Ticket Selector?" (DWMTS) type event |
|
765 | + * (ie: $_max_atndz === 1) where there are no available tickets, |
|
766 | + * either because they are sold out, expired, or not yet on sale. |
|
767 | + * In this case, we need to close the form BEFORE adding any closing divs |
|
768 | + * @return string |
|
769 | + * @throws EE_Error |
|
770 | + * @throws ReflectionException |
|
771 | + */ |
|
772 | + public function displayViewDetailsButton(bool $DWMTS = false): string |
|
773 | + { |
|
774 | + if (! $this->event->get_permalink()) { |
|
775 | + EE_Error::add_error( |
|
776 | + esc_html__('The URL for the Event Details page could not be retrieved.', 'event_espresso'), |
|
777 | + __FILE__, |
|
778 | + __FUNCTION__, |
|
779 | + __LINE__ |
|
780 | + ); |
|
781 | + } |
|
782 | + $view_details_btn = '<form method="GET" action="'; |
|
783 | + $view_details_btn .= apply_filters( |
|
784 | + 'FHEE__EE_Ticket_Selector__display_view_details_btn__btn_url', |
|
785 | + $this->event->get_permalink(), |
|
786 | + $this->event |
|
787 | + ); |
|
788 | + $view_details_btn .= '"'; |
|
789 | + // open link in new window ? |
|
790 | + $view_details_btn .= apply_filters( |
|
791 | + 'FHEE__EventEspresso_modules_ticket_selector_DisplayTicketSelector__displayViewDetailsButton__url_target_blank', |
|
792 | + $this->isIframe(), |
|
793 | + $this |
|
794 | + ) |
|
795 | + ? ' target="_blank"' |
|
796 | + : ''; |
|
797 | + $view_details_btn .= '>'; |
|
798 | + $btn_text = apply_filters( |
|
799 | + 'FHEE__EE_Ticket_Selector__display_view_details_btn__btn_text', |
|
800 | + esc_html__('View Details', 'event_espresso'), |
|
801 | + $this->event |
|
802 | + ); |
|
803 | + $view_details_btn .= '<input id="ticket-selector-submit-' |
|
804 | + . $this->event->ID() |
|
805 | + . '-btn" class="ticket-selector-submit-btn view-details-btn" type="submit" value="' |
|
806 | + . $btn_text |
|
807 | + . '" />'; |
|
808 | + $view_details_btn .= apply_filters('FHEE__EE_Ticket_Selector__after_view_details_btn', '', $this->event); |
|
809 | + if ($DWMTS) { |
|
810 | + $view_details_btn .= $this->formClose(); |
|
811 | + $view_details_btn .= $this->ticketSelectorEndDiv(); |
|
812 | + $view_details_btn .= '<br/>'; |
|
813 | + } else { |
|
814 | + $view_details_btn .= $this->clearTicketSelector(); |
|
815 | + $view_details_btn .= '<br/>'; |
|
816 | + $view_details_btn .= $this->formClose(); |
|
817 | + } |
|
818 | + return $view_details_btn; |
|
819 | + } |
|
820 | + |
|
821 | + |
|
822 | + /** |
|
823 | + * @return string |
|
824 | + */ |
|
825 | + public function ticketSelectorEndDiv(): string |
|
826 | + { |
|
827 | + return $this->clearTicketSelector() . '</div><!-- ticketSelectorEndDiv -->'; |
|
828 | + } |
|
829 | + |
|
830 | + |
|
831 | + /** |
|
832 | + * @return string |
|
833 | + */ |
|
834 | + public function clearTicketSelector(): string |
|
835 | + { |
|
836 | + // standard TS displayed, appears after a "Register Now" or "view Details" button |
|
837 | + return '<div class="clear"></div><!-- clearTicketSelector -->'; |
|
838 | + } |
|
839 | + |
|
840 | + |
|
841 | + /** |
|
842 | + * @access public |
|
843 | + * @return string |
|
844 | + */ |
|
845 | + public function formClose(): string |
|
846 | + { |
|
847 | + return '</form>'; |
|
848 | + } |
|
849 | + |
|
850 | + |
|
851 | + /** |
|
852 | + * handleMissingEvent |
|
853 | + * Returns either false or an error to display when no valid event is passed. |
|
854 | + * |
|
855 | + * @return string |
|
856 | + * @throws ReflectionException |
|
857 | + * @throws Throwable |
|
858 | + */ |
|
859 | + protected function handleMissingEvent(): string |
|
860 | + { |
|
861 | + // If this is not an iFrame request, simply return false. |
|
862 | + if (! $this->isIframe()) { |
|
863 | + return ''; |
|
864 | + } |
|
865 | + // This is an iFrame so return an error. |
|
866 | + // Display stack trace if WP_DEBUG is enabled. |
|
867 | + if (WP_DEBUG === true && current_user_can('edit_pages')) { |
|
868 | + $event_id = $this->request->getRequestParam('event', 0, 'int'); |
|
869 | + new ExceptionStackTraceDisplay( |
|
870 | + new InvalidArgumentException( |
|
871 | + sprintf( |
|
872 | + esc_html__( |
|
873 | + 'A valid Event ID is required to display the ticket selector.%3$sAn Event with an ID of "%1$s" could not be found.%3$sPlease verify that the embed code added to this post\'s content includes an "%2$s" argument and that its value corresponds to a valid Event ID.', |
|
874 | + 'event_espresso' |
|
875 | + ), |
|
876 | + $event_id, |
|
877 | + 'event', |
|
878 | + '<br />' |
|
879 | + ) |
|
880 | + ) |
|
881 | + ); |
|
882 | + return ''; |
|
883 | + } |
|
884 | + // If WP_DEBUG is not enabled, display a message stating the event could not be found. |
|
885 | + return EEH_HTML::p( |
|
886 | + esc_html__( |
|
887 | + 'A valid Event could not be found. Please contact the event administrator for assistance.', |
|
888 | + 'event_espresso' |
|
889 | + ) |
|
890 | + ); |
|
891 | + } |
|
892 | + |
|
893 | + |
|
894 | + /** |
|
895 | + * @return EE_Tax_Config |
|
896 | + * @since 4.10.14.p |
|
897 | + */ |
|
898 | + protected function getTaxConfig(): EE_Tax_Config |
|
899 | + { |
|
900 | + return isset(EE_Registry::instance()->CFG->tax_settings) |
|
901 | + && EE_Registry::instance()->CFG->tax_settings instanceof EE_Tax_Config |
|
902 | + ? EE_Registry::instance()->CFG->tax_settings |
|
903 | + : new EE_Tax_Config(); |
|
904 | + } |
|
905 | 905 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | 'FHEE__EED_Ticket_Selector__display_ticket_selector__date_format', |
105 | 105 | (string) get_option('date_format') |
106 | 106 | ); |
107 | - $this->time_format = apply_filters( |
|
107 | + $this->time_format = apply_filters( |
|
108 | 108 | 'FHEE__EED_Ticket_Selector__display_ticket_selector__time_format', |
109 | 109 | (string) get_option('time_format') |
110 | 110 | ); |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | if ( |
152 | 152 | isset($event->EE_Event) |
153 | 153 | && $event->EE_Event instanceof EE_Event |
154 | - && ( ! $post instanceof WP_Post || $post->ID === $event->EE_Event->ID() ) |
|
154 | + && ( ! $post instanceof WP_Post || $post->ID === $event->EE_Event->ID()) |
|
155 | 155 | ) { |
156 | 156 | $this->event = $event->EE_Event; |
157 | 157 | return true; |
@@ -163,11 +163,11 @@ discard block |
||
163 | 163 | } |
164 | 164 | } |
165 | 165 | $user_msg = esc_html__('No Event object or an invalid Event object was supplied.', 'event_espresso'); |
166 | - $dev_msg = $user_msg . esc_html__( |
|
166 | + $dev_msg = $user_msg.esc_html__( |
|
167 | 167 | 'In order to generate a ticket selector, please ensure you are passing either an EE_Event object or a WP_Post object of the post type "espresso_event" to the EE_Ticket_Selector class constructor.', |
168 | 168 | 'event_espresso' |
169 | 169 | ); |
170 | - EE_Error::add_error($user_msg . '||' . $dev_msg, __FILE__, __FUNCTION__, __LINE__); |
|
170 | + EE_Error::add_error($user_msg.'||'.$dev_msg, __FILE__, __FUNCTION__, __LINE__); |
|
171 | 171 | return false; |
172 | 172 | } |
173 | 173 | |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | // reset filter for displaying submit button |
227 | 227 | remove_filter('FHEE__EE_Ticket_Selector__display_ticket_selector_submit', '__return_true'); |
228 | 228 | // poke and prod incoming event till it tells us what it is |
229 | - if (! $this->setEvent($event)) { |
|
229 | + if ( ! $this->setEvent($event)) { |
|
230 | 230 | return $this->handleMissingEvent(); |
231 | 231 | } |
232 | 232 | // is the event expired ? |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | if ($template_args['event_is_expired']) { |
235 | 235 | return is_single() |
236 | 236 | ? $this->expiredEventMessage() |
237 | - : $this->expiredEventMessage() . $this->displayViewDetailsButton(); |
|
237 | + : $this->expiredEventMessage().$this->displayViewDetailsButton(); |
|
238 | 238 | } |
239 | 239 | // begin gathering template arguments by getting event status |
240 | 240 | $template_args = ['event_status' => $this->event->get_active_status()]; |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | : $this->loadTicketSelector($tickets, $template_args); |
269 | 269 | // now set up the form (but not for the admin) |
270 | 270 | $ticket_selector = $this->display_full_ui() |
271 | - ? $this->formOpen($this->event->ID(), $external_url) . $ticket_selector |
|
271 | + ? $this->formOpen($this->event->ID(), $external_url).$ticket_selector |
|
272 | 272 | : $ticket_selector; |
273 | 273 | // submit button and form close tag |
274 | 274 | $ticket_selector .= $this->display_full_ui() ? $this->displaySubmitButton($external_url) : ''; |
@@ -352,7 +352,7 @@ discard block |
||
352 | 352 | } |
353 | 353 | return ' |
354 | 354 | <div class="ee-event-expired-notice"> |
355 | - <span class="important-notice">' . $no_ticket_available_msg . '</span> |
|
355 | + <span class="important-notice">' . $no_ticket_available_msg.'</span> |
|
356 | 356 | </div><!-- .ee-event-expired-notice -->'; |
357 | 357 | } |
358 | 358 | |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | '</a></span></div><!-- .ee-attention ticketSalesClosedMessage -->' |
386 | 386 | ); |
387 | 387 | } |
388 | - return '<p><span class="important-notice">' . $sales_closed_msg . '</span></p>'; |
|
388 | + return '<p><span class="important-notice">'.$sales_closed_msg.'</span></p>'; |
|
389 | 389 | } |
390 | 390 | |
391 | 391 | |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | $ticket_query_args[0]['Datetime.DTT_ID'] = $datetime_id; |
423 | 423 | } |
424 | 424 | |
425 | - if (! $show_expired_tickets) { |
|
425 | + if ( ! $show_expired_tickets) { |
|
426 | 426 | // use the correct applicable time query depending on what version of core is being run. |
427 | 427 | $current_time = method_exists('EEM_Datetime', 'current_time_for_query') |
428 | 428 | ? time() |
@@ -493,9 +493,9 @@ discard block |
||
493 | 493 | * @param int $EVT_ID The Event ID |
494 | 494 | * @since 4.9.13 |
495 | 495 | */ |
496 | - $template_args['anchor_id'] = apply_filters( |
|
496 | + $template_args['anchor_id'] = apply_filters( |
|
497 | 497 | 'FHEE__EE_Ticket_Selector__redirect_anchor_id', |
498 | - '#tkt-slctr-tbl-' . $this->event->ID(), |
|
498 | + '#tkt-slctr-tbl-'.$this->event->ID(), |
|
499 | 499 | $this->event->ID() |
500 | 500 | ); |
501 | 501 | $template_args['tickets'] = $tickets; |
@@ -590,30 +590,30 @@ discard block |
||
590 | 590 | // if redirecting, we don't need any anything else |
591 | 591 | if ($external_url) { |
592 | 592 | $html = '<form method="GET" '; |
593 | - $html .= 'action="' . EEH_URL::refactor_url($external_url) . '" '; |
|
594 | - $html .= 'name="ticket-selector-form-' . $ID . '"'; |
|
593 | + $html .= 'action="'.EEH_URL::refactor_url($external_url).'" '; |
|
594 | + $html .= 'name="ticket-selector-form-'.$ID.'"'; |
|
595 | 595 | // open link in new window ? |
596 | - $html .= apply_filters( |
|
596 | + $html .= apply_filters( |
|
597 | 597 | 'FHEE__EventEspresso_modules_ticket_selector_DisplayTicketSelector__formOpen__external_url_target_blank', |
598 | 598 | $this->isIframe(), |
599 | 599 | $this |
600 | 600 | ) |
601 | 601 | ? ' target="_blank"' |
602 | 602 | : ''; |
603 | - $html .= '>'; |
|
603 | + $html .= '>'; |
|
604 | 604 | $query_args = EEH_URL::get_query_string($external_url); |
605 | 605 | foreach ((array) $query_args as $query_arg => $value) { |
606 | - $html .= '<input type="hidden" name="' . $query_arg . '" value="' . $value . '">'; |
|
606 | + $html .= '<input type="hidden" name="'.$query_arg.'" value="'.$value.'">'; |
|
607 | 607 | } |
608 | 608 | return $html; |
609 | 609 | } |
610 | 610 | // if there is no submit button, then don't start building a form |
611 | 611 | // because the "View Details" button will build its own form |
612 | - if (! apply_filters('FHEE__EE_Ticket_Selector__display_ticket_selector_submit', false)) { |
|
612 | + if ( ! apply_filters('FHEE__EE_Ticket_Selector__display_ticket_selector_submit', false)) { |
|
613 | 613 | return ''; |
614 | 614 | } |
615 | 615 | $checkout_url = EEH_Event_View::event_link_url($ID); |
616 | - if (! $checkout_url) { |
|
616 | + if ( ! $checkout_url) { |
|
617 | 617 | EE_Error::add_error( |
618 | 618 | esc_html__('The URL for the Event Details page could not be retrieved.', 'event_espresso'), |
619 | 619 | __FILE__, |
@@ -624,8 +624,8 @@ discard block |
||
624 | 624 | // set no cache headers and constants |
625 | 625 | EE_System::do_not_cache(); |
626 | 626 | $html = '<form method="POST" '; |
627 | - $html .= 'action="' . $checkout_url . '" '; |
|
628 | - $html .= 'name="ticket-selector-form-' . $ID . '"'; |
|
627 | + $html .= 'action="'.$checkout_url.'" '; |
|
628 | + $html .= 'name="ticket-selector-form-'.$ID.'"'; |
|
629 | 629 | $html .= $this->iframe ? ' target="_blank"' : ''; |
630 | 630 | $html .= '>'; |
631 | 631 | $html .= '<input type="hidden" name="ee" value="process_ticket_selections">'; |
@@ -651,7 +651,7 @@ discard block |
||
651 | 651 | $html .= empty($external_url) |
652 | 652 | ? $this->ticketSelectorEndDiv() |
653 | 653 | : $this->clearTicketSelector(); |
654 | - $html .= '<br/>' . $this->formClose(); |
|
654 | + $html .= '<br/>'.$this->formClose(); |
|
655 | 655 | } elseif ($this->getMaxAttendees() === 1) { |
656 | 656 | // its a "Dude Where's my Ticket Selector?" (DWMTS) type event (ie: $_max_atndz === 1) |
657 | 657 | if ($this->event->is_sold_out()) { |
@@ -709,7 +709,7 @@ discard block |
||
709 | 709 | // no submit or view details button, and no additional content |
710 | 710 | $html .= $this->ticketSelectorEndDiv(); |
711 | 711 | } |
712 | - if (! $this->iframe && ! is_archive()) { |
|
712 | + if ( ! $this->iframe && ! is_archive()) { |
|
713 | 713 | $html .= EEH_Template::powered_by_event_espresso('', '', ['utm_content' => 'ticket_selector']); |
714 | 714 | } |
715 | 715 | } |
@@ -729,7 +729,7 @@ discard block |
||
729 | 729 | */ |
730 | 730 | public function displayRegisterNowButton(): string |
731 | 731 | { |
732 | - $btn_text = apply_filters( |
|
732 | + $btn_text = apply_filters( |
|
733 | 733 | 'FHEE__EE_Ticket_Selector__display_ticket_selector_submit__btn_text', |
734 | 734 | esc_html__('Register Now', 'event_espresso'), |
735 | 735 | $this->event |
@@ -738,16 +738,16 @@ discard block |
||
738 | 738 | && $this->event->external_url() !== get_the_permalink() |
739 | 739 | ? $this->event->external_url() |
740 | 740 | : ''; |
741 | - $html = EEH_HTML::div( |
|
741 | + $html = EEH_HTML::div( |
|
742 | 742 | '', |
743 | - 'ticket-selector-submit-' . $this->event->ID() . '-btn-wrap', |
|
743 | + 'ticket-selector-submit-'.$this->event->ID().'-btn-wrap', |
|
744 | 744 | 'ticket-selector-submit-btn-wrap' |
745 | 745 | ); |
746 | - $html .= '<input id="ticket-selector-submit-' . $this->event->ID() . '-btn"'; |
|
746 | + $html .= '<input id="ticket-selector-submit-'.$this->event->ID().'-btn"'; |
|
747 | 747 | $html .= ' class="ticket-selector-submit-btn '; |
748 | 748 | $html .= empty($external_url) ? 'ticket-selector-submit-ajax"' : '"'; |
749 | - $html .= ' type="submit" value="' . $btn_text . '" data-ee-disable-after-recaptcha="true" />'; |
|
750 | - $html .= EEH_HTML::divx() . '<!-- .ticket-selector-submit-btn-wrap -->'; |
|
749 | + $html .= ' type="submit" value="'.$btn_text.'" data-ee-disable-after-recaptcha="true" />'; |
|
750 | + $html .= EEH_HTML::divx().'<!-- .ticket-selector-submit-btn-wrap -->'; |
|
751 | 751 | $html .= apply_filters( |
752 | 752 | 'FHEE__EE_Ticket_Selector__after_ticket_selector_submit', |
753 | 753 | '', |
@@ -771,7 +771,7 @@ discard block |
||
771 | 771 | */ |
772 | 772 | public function displayViewDetailsButton(bool $DWMTS = false): string |
773 | 773 | { |
774 | - if (! $this->event->get_permalink()) { |
|
774 | + if ( ! $this->event->get_permalink()) { |
|
775 | 775 | EE_Error::add_error( |
776 | 776 | esc_html__('The URL for the Event Details page could not be retrieved.', 'event_espresso'), |
777 | 777 | __FILE__, |
@@ -795,7 +795,7 @@ discard block |
||
795 | 795 | ? ' target="_blank"' |
796 | 796 | : ''; |
797 | 797 | $view_details_btn .= '>'; |
798 | - $btn_text = apply_filters( |
|
798 | + $btn_text = apply_filters( |
|
799 | 799 | 'FHEE__EE_Ticket_Selector__display_view_details_btn__btn_text', |
800 | 800 | esc_html__('View Details', 'event_espresso'), |
801 | 801 | $this->event |
@@ -824,7 +824,7 @@ discard block |
||
824 | 824 | */ |
825 | 825 | public function ticketSelectorEndDiv(): string |
826 | 826 | { |
827 | - return $this->clearTicketSelector() . '</div><!-- ticketSelectorEndDiv -->'; |
|
827 | + return $this->clearTicketSelector().'</div><!-- ticketSelectorEndDiv -->'; |
|
828 | 828 | } |
829 | 829 | |
830 | 830 | |
@@ -859,7 +859,7 @@ discard block |
||
859 | 859 | protected function handleMissingEvent(): string |
860 | 860 | { |
861 | 861 | // If this is not an iFrame request, simply return false. |
862 | - if (! $this->isIframe()) { |
|
862 | + if ( ! $this->isIframe()) { |
|
863 | 863 | return ''; |
864 | 864 | } |
865 | 865 | // This is an iFrame so return an error. |