WC_Data::get_prop PHP Метод

get_prop() защищенный Метод

Gets the value from either current pending changes, or the data itself. Context controls what happens to the value before it's returned.
С версии: 2.7.0
protected get_prop ( string $prop, string $context = 'view' ) : mixed
$prop string Name of prop to get.
$context string What the value is for. Valid values are view and edit.
Результат mixed
    protected function get_prop($prop, $context = 'view')
    {
        $value = null;
        if (array_key_exists($prop, $this->data)) {
            $value = isset($this->changes[$prop]) ? $this->changes[$prop] : $this->data[$prop];
            if ('view' === $context) {
                $value = apply_filters($this->get_hook_prefix() . $prop, $value, $this);
            }
        }
        return $value;
    }