Automattic\WooCommerce\Internal\Caches
ProductCache::get_object_id
Get the id of an object to be cached.
Метод класса: ProductCache{}
Хуков нет.
Возвращает
int. The id of the object.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_object_id( $product );
- $product(WC_Product) (обязательный)
- The product to be cached.
Список изменений
| С версии 10.5.0 | Введена. |
Код ProductCache::get_object_id() ProductCache::get object id WC 10.5.2
protected function get_object_id( $product ) {
return $product->get_id();
}