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

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

Note that woocommerce_cart_needs_payment is only used in WC_Checkout::process_checkout() to keep backwards compatibility. Use woocommerce_order_needs_payment instead.

Note that at this point you can't rely on the Cart Object anymore, since it could be empty see: https://github.com/woocommerce/woocommerce/issues/24631

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

add_filter( 'woocommerce_cart_needs_payment', 'filter_function_name_4039', 10, 2 );
function filter_function_name_4039( $needs_payment, $WC()->cart ){
	// filter...

	return $needs_payment;
}
$needs_payment
-
$WC()->cart
-

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

WC_Checkout::process_checkout()
woocommerce_cart_needs_payment
WC_Cart::needs_payment()
woocommerce_cart_needs_payment
woocommerce/includes/class-wc-checkout.php 1182
if ( apply_filters( 'woocommerce_cart_needs_payment', $order->needs_payment(), WC()->cart ) ) {
woocommerce/includes/class-wc-cart.php 1380
return apply_filters( 'woocommerce_cart_needs_payment', 0 < $this->get_total( 'edit' ), $this );

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

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