fast_events_order_name

The filter is called for every new order. Filter the name and return a WP_Error if necessary.

1<?php
2function your_filter_order_name( $name ) {
3  if ( in_array( $name, array( 'Idiot', 'Moron' ) ) ) {
4      return new WP_Error( 'invalid_name', 'This name is not allowed', array( 'status' => 400 ) );
5  }
6  return $name;
7}
8
9add_filter( 'fast_events_order_name', 'your_filter_order_name', 10, 1 );

Parameters

$name

(string) Name of the buyer.


Return

(string | WP_Error) The name or WP_Error.


Changelog

Version

Description

2.2.0

Introduced.