Automattic\WooCommerce\StoreApi\Schemas\V1

BillingAddressSchema::sanitize_callback()publicWC 1.0

Sanitize and format the given address object.

{} Это метод класса: BillingAddressSchema{}

Хуков нет.

Возвращает

Массив.

Использование

$BillingAddressSchema = new BillingAddressSchema();
$BillingAddressSchema->sanitize_callback( $address, $request, $param );
$address(массив) (обязательный)
Value being sanitized.
$request(\WP_REST_Request) (обязательный)
The Request.
$param(строка) (обязательный)
The param being sanitized.

Код BillingAddressSchema::sanitize_callback() WC 6.7.0

public function sanitize_callback( $address, $request, $param ) {
	$address          = parent::sanitize_callback( $address, $request, $param );
	$address['email'] = wc_clean( wp_unslash( $address['email'] ) );
	return $address;
}