如何在感谢页面获取自定义字段值

时间:2013-08-23 05:02:06

标签: php wordpress woocommerce

我将以下代码添加到function.php页面,它显示了结帐页面上的选择框。但是如何在感谢页面上获得所选项目的价值。

add_filter('woocommerce_checkout_fields', 'custom_override_checkout_fields');

function custom_override_checkout_fields($fields) {
    $fields['billing']['point_side'] = array(
        'label' => __(
            '<strong>Select Where Your Points Should Go</strong>',
            'woocommerce'
        ),
        'placeholder' => _x(
            'custom_field', 'placeholder',
            'woocommerce'
        ),
        'required' => true,
        'clear' => false,
        'type' => 'select',
        'class' => array('form-row-wide'),
        'options' => array(
            'default1' => __('Defult1', 'woocommerce'),
            'ls' => __('Left Side', 'woocommerce'),
            'rs' => __('Right Side', 'woocommerce')
        )
    );

    return $fields;
}

任何帮助表示赞赏。

0 个答案:

没有答案
相关问题