Automattic\WooCommerce\StoreApi\Schemas\V1
ProductSchema::filter_valid_attribute
Returns true if the given attribute is valid.
Method of the class: ProductSchema{}
No Hooks.
Returns
true|false
.
Usage
// protected - for code of main (parent) or child class $result = $this->filter_valid_attribute( $attribute );
- $attribute(mixed) (required)
- Object or variable to check.
ProductSchema::filter_valid_attribute() ProductSchema::filter valid attribute code WC 9.9.4
protected function filter_valid_attribute( $attribute ) { return is_a( $attribute, '\WC_Product_Attribute' ); }