WooCommerce Code Reference

PaymentResult
in package

PaymentResult class.

Table of Contents

$payment_details  : string
Array of details about the payment.
$redirect_url  : string
Redirect URL for checkout.
$status  : string
Current payment status.
$valid_statuses  : array<string|int, mixed>
List of valid payment statuses.
__construct()  : mixed
Constructor.
__get()  : mixed
Magic getter for protected properties.
set_payment_details()  : mixed
Set payment details.
set_redirect_url()  : mixed
Set redirect URL.
set_status()  : mixed
Set payment status.

Properties

Methods

__construct()

Constructor.

public __construct([string $status = '' ]) : mixed
Parameters
$status : string = ''

Sets the payment status for the result.

Return values
mixed

set_payment_details()

Set payment details.

public set_payment_details([array<string|int, mixed> $payment_details = [] ]) : mixed
Parameters
$payment_details : array<string|int, mixed> = []

Array of key value pairs of data.

Return values
mixed

set_redirect_url()

Set redirect URL.

public set_redirect_url([array<string|int, mixed> $redirect_url = [] ]) : mixed
Parameters
$redirect_url : array<string|int, mixed> = []

URL to redirect the customer to after checkout.

Return values
mixed

set_status()

Set payment status.

public set_status(string $payment_status) : mixed
Parameters
$payment_status : string

Status to set.

Tags
throws
Exception

When an invalid status is provided.

Return values
mixed