New Landing How can we help? Atelier Woocommerce variation dropdown

Viewing 5 posts - 1 through 5 (of 5 total)
  • Posted in: Atelier
  • #281693
    sopmarteau
    Member
    Post count: 22

    Hello,
    I would like to know how to get the name of the variation instead of “choose option” in the dropdown variation?

    For example I have a variation named “Sizes” and I would like that my dropdown shows “Choose sizes” or “Sizes” instead of “choose option”.
    You can see image attached…If we drop down the menu, we don’t know what these numbers are for…

    Thanks a lot!
    Sophie

    Attachments:
    You must be logged in to view attached files.
    #281697
    David Martin – Support
    Moderator
    Post count: 20834

    Install and activate your child theme.

    Inside the child theme functions.php add this:

    /* VARIABLE PRODUCT CUSTOM SELECT
    ================================================== */
    if ( ! function_exists( ‘sf_wc_filter_dropdown_args’ ) ) {
    function sf_wc_filter_dropdown_args( $args ) {
    $variation_tax = get_taxonomy( $args[‘attribute’] );
    $prefix_text = __( ‘Select ‘, ‘swiftframework’ );
    $prefix_text .= $variation_tax->labels->name;
    $args[‘show_option_none’] = apply_filters( ‘the_title’, $prefix_text );
    return $args;
    }
    add_filter( ‘woocommerce_dropdown_variation_attribute_options_args’, ‘sf_wc_filter_dropdown_args’, 10 );
    }

    #281708
    sopmarteau
    Member
    Post count: 22

    Thanks a lot for your promptness!
    It works great! But is the word “Select” can be removed? French language is not as fluid as english 😉 As size is feminine I would need to add an article after select (and translate select as well…) so it would be easier to remove the “Select word”… (see image attached)

    Thank you!!

    Attachments:
    You must be logged in to view attached files.
    #281754
    sopmarteau
    Member
    Post count: 22

    Nevermind, I found out how to remove this Select word.

    Thanks a lot!
    Sophie

    #281832
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I am glad that you managed to resolve the issue.
    Thanks
    Mohammad

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register