WordPress at Your Fingertips
function is not described

WC_Order::needs_payment() public WC 1.0

Checks if an order needs payment, based on status and order total.

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

Return

true|false.

Usage

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

Code of WC_Order::needs_payment() WC 5.8.0

public function needs_payment() {
	$valid_order_statuses = apply_filters( 'woocommerce_valid_order_statuses_for_payment', array( 'pending', 'failed' ), $this );
	return apply_filters( 'woocommerce_order_needs_payment', ( $this->has_status( $valid_order_statuses ) && $this->get_total() > 0 ), $this, $valid_order_statuses );
}