fast_events_new_order_text

Filter the default error text while processing the order and change the text if necessary.

1<?php
2function your_filter_new_order_text( $message, $type ) {
3  // Do your manipulation here
4  return $message;
5}
6
7add_filter( 'fast_events_new_order_text', 'your_filter_new_order_text', 10, 2 );

Parameters

$message

(string) The localized message-string.

$type

(int) The type of message.

  1. Choose event’. Used during a single select.

  2. Choose 1 or more events’. The user can select multiple events during ordering.

  3. Mandatory input not available’. Name and/or emailaddress are not available.

  4. Invalid emailaddress’.

  5. Name is too long (Max 50 chars)’.

  6. Emailaddress is too long (Max 100 chars)’.

  7. WordPress nonce error, please reload the order form and try again’.

  8. You must agree to the terms’.

  9. Wrong reCAPTCHA’.

  10. Mandatory input is not available’. Extra input fields are not filled or no event selected.

  11. No event selected’.

  12. Event does not exist’.

  13. Invalid event ids’. One of the selected events is not valid.

  14. You already have a booking/order’. The user is trying to order again whilst this is not allowed.

  15. Event %d does not exists’. Caution: make sure you include ‘%d’, which will be substituted with the event id.

  16. Event %d is not active’.

  17. Filter corrupted output’. The fast_events_input_fields filter was used and it corrupted the output.

  18. You are not allowed to book/order’. A user group check prohibited the user from placing an order.

  19. You can book a maximum of %d tickets’. A user group check did limit the number of tickets a user can order. Make sure you include ‘%d’.

  20. No more stock available for “%s”‘. The ‘%s’ is substituted with the event name. Make sure it is included in your message.

  21. Stock update failed for “%s”‘.

  22. Not enough stock available for ticket-type: %1$s (%2$s)’. Make sure you include the string ‘%1$s (%2$s)‘, which represents the ticket-name and event name.

  23. No child events found for passe-partout’. You defined a passe-partout, but did not include events.

  24. Unknown user’. The WordPress user is unknown.

  25. Invalid password’. The password for the WordPress user is invalid.

  26. User role mismatch’. The user role did not match the one(s) defined in the user group.

  27. Missing ticket type:’. The ticket type is not present in the input. The name of the ticket is appended after the colon.

  28. Missing extra input fields for this event’. The extra input fields are not submitted.

  29. Required extra input fields not available’. The required extra input fields are not submitted.

  30. No tickets ordered’.

  31. Not enough stock for linked event-id %d’.

  32. Illegal value extra input field’. This may happen in case of a ‘select’ field.

  33. Wrong amount for this ticket type:’. The amount is too low or too high. The name of the ticket is appended after the colon.

  34. Coupon code %s not found’. The coupon code does not exist.

  35. The discount code is not yet active’.

  36. The discount code has expired’.

  37. The maximum number of times the discount code can be used has been reached’.

  38. This discount code is linked to another email address’.

  39. This discount code is not linked to this event’.

  40. This discount code requires a minimum of %1$s tickets %2$s’. The first parameter is the minimum number of tickets. The second a comma-separated list of ticket types.

  41. This discount code allows a maximum of%1$s tickets %2$s’. The first parameter is the maximum number of tickets. The second a comma-separated list of ticket types.

  42. A minimum amount of %1$s %2$s is required for this discount code’.The first parameter is the minimum amount. The second a comma-separated list of ticket types.

  43. A maximum amount of %1$s %2$s is allowed for this discount code’.The first parameter is the maximum amount. The second a comma-separated list of ticket types.

  44. The maximum number of times the discount code can be used is: %s’.


Return

(string) Message string.


Changelog

Version

Description

1.0

Introduced.


Examples

Change description of selecting an event

If the user has the option to select 1 dance evening from a select box, the standard description is ‘Choose event‘.

1<?php
2function your_filter_new_order_text( $message, $type ) {
3  if ( 0 === $type ) {
4        return "Choose your dance evening";
5  }
6  return $message;
7}
8
9add_filter( 'fast_events_new_order_text', 'your_filter_new_order_text', 10, 2 );