Automattic\WooCommerce\Blocks\BlockTypes
AbstractDynamicBlock::get_schema_boolean()
Get the schema for a boolean 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_boolean( $default );
- $default(string)
- The default value.
Default: true
AbstractDynamicBlock::get_schema_boolean() AbstractDynamicBlock::get schema boolean code WC 9.4.2
protected function get_schema_boolean( $default = true ) { return array( 'type' => 'boolean', 'default' => $default, ); }