Automattic\WooCommerce\StoreApi\Payments
PaymentResult::set_status()
Set payment status.
Method of the class: PaymentResult{}
No Hooks.
Return
null
. Nothing (null).
Usage
$PaymentResult = new PaymentResult(); $PaymentResult->set_status( $payment_status );
- $payment_status(string) (required)
- Status to set.
PaymentResult::set_status() PaymentResult::set status code WC 9.3.3
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; }