How to set drops downs on configurable products to be set to the first option rather than please select.
I have tried below code:
<script>
require(['jquery', 'jquery/ui'], function($){
$('.product-add-form .field select').each(function(i, obj) {
$(obj).find('option:eq(1)').prop('selected', true);
});
});
</script>
However, this fails unless iI time it out a bit which feels messy. It also does not update price when using this method.