Automattic\WooCommerce\Internal\RestApi\Routes\V4
AbstractSchema::filter_writable_props
Filter schema properties to only return writable ones.
Method of the class: AbstractSchema{}
No Hooks.
Returns
true|false. True if the property is writable, false otherwise.
Usage
// protected - for code of main (parent) or child class $result = $this->filter_writable_props( $schema ): bool;
- $schema(array) (required)
- The schema property to check.
Changelog
| Since 10.2.0 | Introduced. |
AbstractSchema::filter_writable_props() AbstractSchema::filter writable props code WC 10.4.3
protected function filter_writable_props( array $schema ): bool {
return empty( $schema['readonly'] );
}