yit_get_product_id

Retrieve the product id.

Description

yit_get_product_id( (WC_Product) $product ); 

Parameters (1)

0. $product (WC_Product)
The product.

Usage

  1. if ( !function_exists( 'yit_get_product_id' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'yith-woocommerce-compare/plugin-fw/yit-woocommerce-compatibility.php'; 
  3.  
  4. // The product. 
  5. $product = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = yit_get_product_id($product); 
  9.  

Defined (1)

The function is defined in the following location(s).

/plugin-fw/yit-woocommerce-compatibility.php  
  1. function yit_get_product_id( $product ) { 
  2. return yit_get_prop( $product, 'id' );