WC_Checkout::get_value PHP Method

get_value() public method

Gets the value either from the posted data, or from the users meta data.
public get_value ( string $input ) : string | null
$input string
return string | null
    public function get_value($input)
    {
        if (!empty($_POST[$input])) {
            return wc_clean($_POST[$input]);
        } else {
            if (has_filter('woocommerce_checkout_get_value')) {
                return apply_filters('woocommerce_checkout_get_value', null, $input);
            }
            if (is_callable(array(WC()->customer, "get_{$input}"))) {
                $value = WC()->customer->{"get_{$input}"}();
            } else {
                $value = null;
            }
            return apply_filters('default_checkout_' . $input, $value, $input);
        }
    }