WC_Cart::needs_payment()
Looks at the totals to see if payment is actually required.
Method of the class: WC_Cart{}
Hooks from the method
Return
true|false
.
Usage
$WC_Cart = new WC_Cart(); $WC_Cart->needs_payment();
WC_Cart::needs_payment() WC Cart::needs payment code WC 9.4.2
public function needs_payment() { return apply_filters( 'woocommerce_cart_needs_payment', 0 < $this->get_total( 'edit' ), $this ); }