Merge pull request #6303 from quadshot/default-billing-info

adding a method to allow default billing information in order metabox
This commit is contained in:
Mike Jolley 2014-09-18 17:23:18 +01:00
commit 9ae9b0e651
1 changed files with 4 additions and 2 deletions

View File

@ -247,10 +247,12 @@ class WC_Meta_Box_Order_Data {
switch ( $field['type'] ) {
case 'select' :
woocommerce_wp_select( array( 'id' => '_billing_' . $key, 'label' => $field['label'], 'options' => $field['options'] ) );
// allow for setting a default value programaticaly, and draw the selectbox
woocommerce_wp_select( array( 'id' => '_billing_' . $key, 'label' => $field['label'], 'options' => $field['options'], 'value' => isset( $field['value'] ) ? $field['value'] : '' ) );
break;
default :
woocommerce_wp_text_input( array( 'id' => '_billing_' . $key, 'label' => $field['label'] ) );
// allow for setting a default value programaticaly, and draw the textbox
woocommerce_wp_text_input( array( 'id' => '_billing_' . $key, 'label' => $field['label'], 'value' => isset( $field['value'] ) ? $field['value'] : '' ) );
break;
}
}