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

WC_Order::needs_payment() WC 1.0

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

Это метод класса: WC_Order

Возвращает

true/false.

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

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

Код WC Order::needs payment: woocommerce/includes/class-wc-order.php WC 3.6.5

<?php
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 );
}