WC_Cart::needs_payment()publicWC 1.0

Looks at the totals to see if payment is actually required.

{} It's a method of the class: WC_Cart{}

Hooks from the method

Return

true|false.

Usage

$WC_Cart = new WC_Cart();
$WC_Cart->needs_payment();

Code of WC_Cart::needs_payment() WC 6.7.0

public function needs_payment() {
	return apply_filters( 'woocommerce_cart_needs_payment', 0 < $this->get_total( 'edit' ), $this );
}