woocommerce_form_field and hidden fields

前端 未结 5 714
[愿得一人]
[愿得一人] 2021-01-14 17:18

I\'m trying to add custom fields to the WooCommerce checkout and there seems to be no output for hidden fields.

In woocommerce-template.php, hidden fie

5条回答
  •  旧时难觅i
    2021-01-14 17:56

    I'm not sure exactly how you are adding the other non-hidden custom fields, but you can just echo html.

    i.e.

    Add a hook:

    add_action('woocommerce_before_checkout_billing_form', array(&$this, 'custom_before_checkout_billing_form') );
    

    Then in your own function do something like this:

    function custom_before_checkout_billing_form($checkout) {
    
        echo '';
    }
    

提交回复
热议问题