woocommerce_update_product_stock_query filter-hookWC 1.0

Usage

add_filter( 'woocommerce_update_product_stock_query', 'wp_kama_woocommerce_update_product_stock_query_filter', 10, 4 );

/**
 * Function for `woocommerce_update_product_stock_query` filter-hook.
 * 
 * @param  $sql                   
 * @param  $product_id_with_stock 
 * @param  $stock_quantity        
 * @param  $string                
 *
 * @return 
 */
function wp_kama_woocommerce_update_product_stock_query_filter( $sql, $product_id_with_stock, $stock_quantity, $string ){

	// filter...
	return $sql;
}
$sql
-
$product_id_with_stock
-
$stock_quantity
-
$string
-

Where the hook is called

WC_Product_Data_Store_CPT::set_product_stock()
woocommerce_update_product_stock_query
WC_Product_Data_Store_CPT::update_product_stock()
woocommerce_update_product_stock_query
woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php 1553
$sql = apply_filters( 'woocommerce_update_product_stock_query', $sql, $product_id_with_stock, $stock_quantity, 'set' );
woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php 1622
$sql = apply_filters( 'woocommerce_update_product_stock_query', $sql, $product_id_with_stock, $new_stock, $operation );

Where the hook is used in WooCommerce

Usage not found.