Возможно пригодится кому-то:
add_action('woocommerce_add_to_cart', 'update_product_stock_on_add', 10, 6);
function update_product_stock_on_add($cart_item_key, $product_id, $quantity, $variation_id, $variation, $cart_item_data) {
global $woocommerce;
$product = get_product($product_id);
$woocommerce->cart->cart_contents[$cart_item_key]['old_stock_quantity'] = $product->get_stock_quantity();
$woocommerce->cart->cart_contents[$cart_item_key]['add_time'] = time();
wc_update_product_stock($product_id, $product->get_stock_quantity() - $quantity);
}
add_action('woocommerce_after_cart_item_quantity_update', 'update_product_stock_on_update', 10, 2);
function update_product_stock_on_update($cart_item_key, $quantity) {
global $woocommerce;
$cart_item = $woocommerce->cart->cart_contents[$cart_item_key];
wc_update_product_stock($cart_item['product_id'], $cart_item['old_stock_quantity'] - $quantity);
}