src/WooCommerce/Shop/InvoiceStatusOverviewForm.php
private function setStatus($status, $message = '')
    {
        if ($status > $this->status) {
            $this->status = $status;
            // Save the message belonging to this worse state.
            if (!empty($message)) {
                $this->statusMessage = $message;
            }
        }
    }
private function setStatus($status, $message = '')
    {
        if ($status > $this->status) {
            $this->status = $status;
            // Save the message belonging to this worse state.
            if (!empty($message)) {
                $this->statusMessage = $message;
            }
        }
    }
private function setStatus ( $ status , $ message = '' ) { if ( $ status > $ this -> status ) { $ this -> status = $ status ; // Save the message belonging to this worse state. if ( ! empty ( $ message ) ) { $ this -> statusMessage = $ message ; } } }
Sets the status, but only if it is "worse" than the current status.

@param int $status
The status to set.
@param string $message
Optionally, a message indicating what is wrong may be given.
Sets the status but only if it is worse than the current status .