WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
фильтр не описан

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

Force quantity to 1 if sold individually and check for existing item in cart.

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

add_filter( 'woocommerce_add_to_cart_sold_individually_quantity', 'filter_function_name_1658', 10, 5 );
function filter_function_name_1658( $1, $quantity, $product_id, $variation_id, $cart_item_data ){
	// filter...

	return $1;
}
$1
-
$quantity
-
$product_id
-
$variation_id
-
$cart_item_data
-

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

WC_Cart::add_to_cart()
woocommerce_add_to_cart_sold_individually_quantity
CartController::filter_request_data()
woocommerce_add_to_cart_sold_individually_quantity
woocommerce/includes/class-wc-cart.php 1134
$quantity      = apply_filters( 'woocommerce_add_to_cart_sold_individually_quantity', 1, $quantity, $product_id, $variation_id, $cart_item_data );
woocommerce/packages/woocommerce-blocks/src/StoreApi/Utilities/CartController.php 731
$request['quantity'] = apply_filters( 'woocommerce_add_to_cart_sold_individually_quantity', 1, $request['quantity'], $product_id, $variation_id, $request['cart_item_data'] );

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

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