wcf_get_prop( array $array, string $prop, string $default = null )

Get a specific property of an array without needing to check if that property exists.


Description

Provide a default value if you want to return a specific value if the property is not set.


Parameters

$array

(array) (Required) Array from which the property's value should be retrieved.

$prop

(string) (Required) Name of the property to be retrieved.

$default

(string) (Optional) Value that should be returned if the property is not set or empty. Defaults to null.

Default value: null


Return

(null|string|mixed) The value


Source

File: classes/class-cartflows-utils.php