I've done some research on this before asking and am unable to find the answer I'm looking for. I created a custom select box for the checkout page under billing. It's complete in that it works on the page, submits the data and even adds the data to the emails. However, it doesn't look great. I want it to look like the Country and State drop down boxes, style-wise. Here is the code:
add_filter( 'woocommerce_checkout_fields' , 'custom_store_pickup_field');
function custom_store_pickup_field( $fields ) {
$fields['billing']['my_field_name'] = array(
'type' => 'select',
'options' => array(
'Option 1' => 'Select if choosing local pickup',
'Option 2' => 'Address 1, etc.',
),
'class' => array('own-css-name'),
'label' => __('<br /><p style="font-size:20px;">Please Choose A Pickup Location (if applicable, otherwise skip)'),
);
return $fields;
}
I read online you could make it own-css-name, so i tried that (as seen above), but I'm not sure what that means? What css name would I use to match the country and state style, as those styles came with WooCommerce, they weren't custom?
Edit: I've come up with a solution to inspect element, find class, and use Simple Custom CSS to override and assign the same properties as Country and State have. However, this doesn't seem like the most eloquent solution. I was wondering if there was a better way.