0){ if(a2wl_check_defined('A2WL_USE_RAW_SELECTBOX')){ $select='

'; $select.='

'; }else{ $select = woocommerce_form_field('a2wl_to_country_field', array( 'type' => 'select', 'class' => array( 'chzn-drop' ), 'label' => esc_html__('Ship my orders to: ', 'ali2woo'), 'placeholder' => esc_html__('Select a Country', 'ali2woo'), 'options' => $countries, 'default' => $default_country, 'required'=>true, 'return' => true )); } } else { //use external country selector if not countries are provided $select = ''; } $a2wl_shipping_country_html = '
' . $select . '
'; $a2wl_shipping_country_html = str_replace(array("\r", "\n"), '', $a2wl_shipping_country_html); $input_class = array( 'select' ); $shipping_div_class = array('a2wl_shipping'); //$shipping_to_country_allowed = true; /** * force generation of the shipping drop-down select * by adding first empty element for woocommerce_form_field() * */ if (!$shipping_to_country_allowed) { // $input_class = array( 'select', 'hidden' ); $shipping_div_class = array('a2wl_shipping', 'hidden'); // $shipping_to_country_allowed = false; } $shipping_field_label = ""; if (is_product()){ $shipping_field_label = esc_html__('Ship my orders via:', 'ali2woo'); } // $fid = 'a2wl_shipping_method_field'. isset($cart_item_key) ? $cart_item_key : $product_id; $fid = 'a2wl_shipping_method_field'; if(a2wl_check_defined('A2WL_USE_RAW_SELECTBOX')){ $select='

'; $select.='

'; }else{ $select = woocommerce_form_field($fid, array( 'type' => 'select', 'class' => array( 'chzn-drop' ), 'input_class' => $input_class, 'label' => $shipping_field_label, 'placeholder' => esc_html__('Select a shipping method', 'ali2woo'), 'options' => $shipping_methods , 'default' => $default_shipping_method, 'required'=>true, 'return' => true ) ); } $a2wl_shipping_html = '
' . $select . '
'; $a2wl_shipping_html = str_replace(array("\r", "\n"), '', $a2wl_shipping_html); ?>