WordPress at a glance
function is not described

WC_REST_Controller::validate_setting_text_field() public WC 3.0.0

Validate a text value for a text based setting.

{} It's a method of the class: WC_REST_Controller{}

No Hooks.

Return

String.

Usage

$WC_REST_Controller = new WC_REST_Controller();
$WC_REST_Controller->validate_setting_text_field( $value, $setting );
$value(string) (required)
Value.
$setting(array) (required)
Setting.

Changelog

Since 3.0.0 Introduced.

Code of WC_REST_Controller::validate_setting_text_field() WC 5.0.0

<?php
public function validate_setting_text_field( $value, $setting ) {
	$value = is_null( $value ) ? '' : $value;
	return wp_kses_post( trim( stripslashes( $value ) ) );
}