Automattic\WooCommerce\Caching

ObjectCache::validateprotectedWC 1.0

Validate an object before it's cached.

Method of the class: ObjectCache{}

No Hooks.

Returns

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 9.9.3

abstract protected function validate( $object ): ?array;