2016-11-08 6 views

答えて

3

はwoocommerce_form_field($キー、$ argsを、$値)関数のデフォルト引数($ argsを)です:あなたのケースで

$defaults = array( 
    'type' => 'text', 
    'label' => '', 
    'description' => '', 
    'placeholder' => '', 
    'maxlength' => false, 
    'required' => false, 
    'autocomplete' => false, 
    'id' => $key, 
    'class' => array(), 
    'label_class' => array(), 
    'input_class' => array(), 
    'return' => false, 
    'options' => array(), 
    'custom_attributes' => array(), 
    'validate' => array(), 
    'default' => '', 
); 

あなたはこのように変更する必要があります。

woocommerce_form_field('airport_pickup', array(
    'type'   => 'select', 
    'class'   => array('airport_pickup form-row-wide'), 
    'label'   => __('Would you like us to arrange transportation from the airport to your starting hotel?'), 
    'required' => true, 
    'options'  => array(
         'Y' => __('YES'), 
         'N' => __('NO') 
    ), 
    'default' => 'N'), 
    $checkout->get_value('airport_pickup')); 

希望すると助かります!

+0

はい、動作しています。ありがとう –

+1

クール!問題を解決済みとしてマークすることを忘れないでください。 – Benoti

関連する問題