Automattic\WooCommerce\Internal\Caches
ProductCache::get_object_id
Get the id of an object to be cached.
Method of the class: ProductCache{}
No Hooks.
Returns
Int. The id of the object.
Usage
// protected - for code of main (parent) or child class $result = $this->get_object_id( $product );
- $product(WC_Product) (required)
- The product to be cached.
Changelog
| Since 10.5.0 | Introduced. |
ProductCache::get_object_id() ProductCache::get object id code WC 10.8.1
protected function get_object_id( $product ) {
return $product->get_id();
}