Automattic\WooCommerce\Blocks\BlockTypes
AbstractDynamicBlock::get_schema_boolean
Get the schema for a boolean value.
Method of the class: AbstractDynamicBlock{}
No Hooks.
Returns
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 10.7.0
protected function get_schema_boolean( $default = true ) {
return array(
'type' => 'boolean',
'default' => $default,
);
}