Automattic\WooCommerce\Caching

ObjectCache::get_object_id()protectedWC 1.0

Get the id of an object. This is used by 'set' when a null id is passed. If the object id can't be determined the method must return null.

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

Хуков нет.

Возвращает

int|Строку|null.

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

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

Код ObjectCache::get_object_id() WC 8.7.0

abstract protected function get_object_id( $object );