Chiu

My feedback

  1. 183 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Chiu supported this idea  · 
    An error occurred while saving the comment
    Chiu commented  · 

    Did some research online and managed to put together a piece of code that worked for me! This will remove "Select an Option..." on the dropdown box (which appears if you set it to "Required") and then set your first option to be the default option. I am not a developer though, so if this code is not working for you, please approach others. Just sharing what worked for me :)

    jQuery(document).ready(function(){
    jQuery('.wc-pao-addon-select option:contains("Select an option...")').remove();
    jQuery('.wc-pao-addon-select').prop('selectedIndex', 0);
    });

    Paste this in a plugin such as https://wordpress.org/plugins/custom-css-js/ with their "Add JS" option.

    You can remove the line
    jQuery('.wc-pao-addon-select option:contains("Select an option...")').remove();
    if you prefer to keep the "Select an option..."

    Screenshot: https://share.getcloudapp.com/Blu5YwlW

  2. 3 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Chiu shared this idea  · 

Feedback and Knowledge Base