Automattic\WooCommerce\Caching

ObjectCache::validate()protectedWC 1.0

Validate an object before it's cached.

Method of the class: ObjectCache{}

No Hooks.

Return

Array|null. An array with validation error messages, null or an empty array if there are no errors.

Usage

// protected - for code of main (parent) or child class
$result = $this->validate( $object ): ?array;
$object(array|object) (required)
Object to validate.

ObjectCache::validate() code WC 7.1.0

protected function validate( $object ): ?array {
	return null;
}