WordPress.org

Support

Support » Plugins and Hacks » How to add billing / shipping field

How to add billing / shipping field

  • Hello,
    I tried to add a billing field to woocommerce editing the billing_fields array using woocommerce_billing_fields filter:

    function add_woocommerce_billing_fields($billing_fields){
    	$billing_fields['billing_custom_field'] = array(
    		'type' => 'text',
    		'label' => __('Custom Field'),
    		'placeholder' => _x('Insert your Data', 'placeholder'),
    		'class' => array('form-row-wide'),
    		'required' => false,
    		'clear' => true
    	);
    	return $billing_fields;
    }
    add_filter('woocommerce_billing_fields' , 'add_woocommerce_billing_fields');

    And a new “Custom Field” has appeared on Edit Billing Address page and it works fine.

    The problem is that this field doesn’t appear on User Profile in the WordPress backend so administrators cannot check or edit it.

    How can I add a billing / shipping field to User Profile in the backend?
    Is there a WooCommerce function / hook / filter to use?
    Or I have to edit the WordPress edit_user_profile / edit_user_profile_update hooks?

    http://wordpress.org/extend/plugins/woocommerce/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to add billing / shipping field’ is closed to new replies.