18th January 2021
Framework / CMS
WooCommerce [Version: Since 2.6.0]
Gets and returns the product ID for a given WooCommerce product.
Return Value(s)Returns the product ID as an integer.
Examples of get_id()
<?php $product = wc_get_product($item); $id = $product->get_id();
Used In Projects
Was This Helpful?
If this post has helped you, please let me know. Your feedback will be highly appreciated and will help me build better content.