Automattic\WooCommerce\Caches

OrderCache::get_object_id()protectedWC 1.0

Get the id of an object to be cached.

Метод класса: OrderCache{}

Хуков нет.

Возвращает

int|Строку|null. The id of the object, or null if it can't be determined.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_object_id( $object );
$object(массив|объект) (обязательный)
The object to be cached.

Код OrderCache::get_object_id() WC 8.7.0

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