I am just starting out with Woocommerce and have a question about drop down select field for variable products. In woocommerce when nothing is selected on this dropdowns, \"
In woocommerce the attributes IDs (or taxonomy) begin all by pa_
as "product attribute", so:
<select>
html tag for "Type" should have: id="pa_type"
(but not id="type"
),<select>
html tag for "Size" should have: id="pa_size"
(but not id="size"
).Now you can target each attribute by its taxonomy slug this way:
add_filter( 'woocommerce_dropdown_variation_attribute_options_args', 'dropdown_variation_attribute_options', 10, 1 );
function dropdown_variation_attribute_options( $args ){
// For attribute "Type"
if( 'pa_type' == $args['attribute'] )
$args['show_option_none'] = __( 'Select Framed or Unframed Types', 'woocommerce' );
// For attribute "Sizes"
if( 'pa_size' == $args['attribute'] )
$args['show_option_none'] = __( 'Select Framed or Unframed Sizes', 'woocommerce' );
return $args;
}
Code goes in function.php file of your active child theme (or active theme).
Tested and works.
You are asking many different questions. Here I answer just one. It's the way on StackOverFlow.
Everything is possible in WooCommerce, depending on your knowledge, skills and time to spend.
Your 2nd question is something advanced, complicated and a bit too broad.