woocommerce_get_product_id_by_global_unique_id filter-hookWC 9.1.0

Hook woocommerce_get_product_id_by_global_unique_id.

Usage

add_filter( 'woocommerce_get_product_id_by_global_unique_id', 'wp_kama_woocommerce_get_product_id_by_global_unique_filter', 10, 2 );

/**
 * Function for `woocommerce_get_product_id_by_global_unique_id` filter-hook.
 * 
 * @param mixed  $id               List of post statuses.
 * @param string $global_unique_id Unique ID.
 *
 * @return mixed
 */
function wp_kama_woocommerce_get_product_id_by_global_unique_filter( $id, $global_unique_id ){

	// filter...
	return $id;
}
$id(mixed)
List of post statuses.
$global_unique_id(string)
Unique ID.

Changelog

Since 9.1.0 Introduced.

Where the hook is called

WC_Product_Data_Store_CPT::get_product_id_by_global_unique_id()
woocommerce_get_product_id_by_global_unique_id
woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php 1215
return (int) apply_filters( 'woocommerce_get_product_id_by_global_unique_id', $id, $global_unique_id );

Where the hook is used in WooCommerce

Usage not found.