Automattic\WooCommerce\Caches

OrderCache::get_object_idprotectedWC 1.0

Get the id of an object to be cached.

Method of the class: OrderCache{}

No Hooks.

Returns

Int|String|null. The id of the object, or null if it can't be determined.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_object_id( $object );
$object(array|object) (required)
The object to be cached.

OrderCache::get_object_id() code WC 10.7.0

protected function get_object_id( $object ) {
	return $object->get_id();
}