fast_events_new_order_text

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

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

add_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.


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
2
3
4
5
6
7
8
9
<?php
function your_filter_new_order_text( $message, $type ) {
  if ( 0 === $type ) {
        return "Choose your dance evening";
  }
  return $message;
}

add_filter( 'fast_events_new_order_text', 'your_filter_new_order_text', 10, 2 );