Automattic\WooCommerce\Blocks\BlockTypes

AbstractDynamicBlock::get_schema_string()protectedWC 1.0

Get the schema for a string value.

Method of the class: AbstractDynamicBlock{}

No Hooks.

Return

Array. Property definition.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_schema_string( $default );
$default(string)
The default value.
Default: ''

AbstractDynamicBlock::get_schema_string() code WC 8.6.1

protected function get_schema_string( $default = '' ) {
	return array(
		'type'    => 'string',
		'default' => $default,
	);
}