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:
commit
9ae9b0e651
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue