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{}
Hooks from the method
Return
true/false.
Usage
$WC_Order = new WC_Order(); $WC_Order->needs_payment();
Code of WC_Order::needs_payment() WC Order::needs payment WC 5.0.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 );
}