WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks\Payments

PaymentResult::set_status() public WC 1.0

Set payment status.

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

No Hooks.

Return

null. Nothing.

Usage

$PaymentResult = new PaymentResult();
$PaymentResult->set_status( $payment_status );
$payment_status(string) (required)
Status to set.

Code of PaymentResult::set_status() WC 5.6.0

public function set_status( $payment_status ) {
	if ( ! in_array( $payment_status, $this->valid_statuses, true ) ) {
		throw new \Exception( sprintf( 'Invalid payment status %s. Use one of %s', $payment_status, implode( ', ', $this->valid_statuses ) ) );
	}
	$this->status = $payment_status;
}