WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
How to add billing / shipping field (3 posts)

  1. Riccardo
    Member
    Posted 1 year ago #

    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/

  2. aranuir
    Member
    Posted 11 months ago #

    HI, I have the same problem. Have you solved?

  3. Riccardo
    Member
    Posted 5 months ago #

    I'm still looking for a solution about it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic