I want to get the CUSTOM HTML for Single Product Page variation Drop Down.
I got some clue here.
Another reference Link
Its Functions are located here →
woocommerce/includes/wc-template-functions.php
I want that the Final HTML to look like this →
<select class="customdropdown" name="customdropdown" id="customdropdown">
<option value="license_one" data-1="500">License One</option>
<option value="license_two" data-2="700">License Two</option>
<option value="license_three" data-3="1400">License Three</option>
</select>
What is the correct process?
We have to edit some template or we have to make changes by using some hooks in WooCommerce?
If there is some hook. Can someone guide me to the proper hook?
2
Answers
Try this code for adding class to the select box – You cannot change the id and other unique names for attributes, it will disable the add to cart function to work properly
In themes/active-child/woocommerce/single-product/add-to-cart create a file variable.php and past below code.