woocommerce_can_reduce_order_stock хук-фильтрWC 1.0

We need an order, and a store with stock management to continue.

Использование

add_filter( 'woocommerce_can_reduce_order_stock', 'wp_kama_woocommerce_can_reduce_order_stock_filter', 10, 2 );

/**
 * Function for `woocommerce_can_reduce_order_stock` filter-hook.
 * 
 * @param  $true  
 * @param  $order 
 *
 * @return 
 */
function wp_kama_woocommerce_can_reduce_order_stock_filter( $true, $order ){

	// filter...
	return $true;
}
$true
-
$order
-

Где вызывается хук

wc_reduce_stock_levels()
woocommerce_can_reduce_order_stock
woocommerce/includes/wc-stock-functions.php 160
if ( ! $order || 'yes' !== get_option( 'woocommerce_manage_stock' ) || ! apply_filters( 'woocommerce_can_reduce_order_stock', true, $order ) ) {

Где используется хук в WooCommerce

Использование не найдено.