get_id(); } /** * Validate an object before caching it. * * @param array|object $object The object to validate. * @return string[]|null An array of error messages, or null if the object is valid. */ protected function validate( $object ): ?array { if ( ! $object instanceof \WC_Abstract_Order ) { return array( 'The supplied order is not an instance of WC_Abstract_Order, ' . gettype( $object ) ); } return null; } }