LTD is back · Limited time only

How to Auto-Select the First Variation in WooCommerce

Last updated on August 7, 2026

Key Takeaways

• Preselect the first variation option on variable product pages

• Reduces the clicks a customer needs before adding to cart

• Applies when a variation dropdown has options to choose from

• Simple on/off toggle, no nested options

What Does the Feature Do?

On a variable product page, WooCommerce leaves every variation unselected until the customer picks one. That is one extra step before the add to cart action can be used. The Auto-Select First Variation feature preselects the first option in each variation dropdown as soon as the page renders.

It works through the dropdown argument filter, so when a dropdown has options, the first one is set as the selected value.

Why You Need It

Preselecting the first variation removes friction:

  • Customers reach the add to cart action faster
  • The default option is already chosen, so the price and selection state render immediately
  • Stores with the most popular option listed first give new customers a sensible default
  • The customer can still change the selection to any other variation

How to Auto-Select the First Variation in WooCommerce

Step 1: Enable the Feature

  1. In WordPress admin, open Classic Monks > WooCommerce.
  2. Open the Single Product settings area.
  3. Toggle on Auto-Select First Variation.

Auto-select first variation option

Step 2: Save and Test

Click Save Changes. Visit a variable product on the front end. The first option in each variation dropdown should be preselected, and the customer can still pick another variation.

Configuration Options

Option Default
Auto-Select First Variation Off

There are no nested options. The feature is a single on/off control.

What Gets Affected

  • Variable product pages: the first option in each variation dropdown is preselected on load
  • The selection state: a variation is chosen as soon as the page renders

What Does NOT Get Affected

  • The variation choices themselves: all options remain available to change
  • The product data and prices: these are unchanged
  • Non-variable products: the feature only applies to variable products with dropdown options
  • The cart: the feature preselects an option; it does not add anything to the cart

Advanced Options (Developers)

The feature registers its logic in functions/woocommerce/variation-display.php, gated on the Auto-Select First Variation option:

add_filter( 'woocommerce_dropdown_variation_attribute_options_args', function($args) {
    if (count($args['options']) > 0) {
        $args['selected'] = $args['options'][0];
    }
    return $args;
});

woocommerce_dropdown_variation_attribute_options_args modifies the dropdown options before rendering. When the dropdown has at least one option, the first one is set as the selected value.

Troubleshooting

Cause: The feature toggle is off, or the dropdown has no options available to select from.
Fix: Confirm Auto-Select First Variation is on. Check that the variable product is configured with variations for its attributes, and that the dropdown has options to choose from.

Cause: The first option in the dropdown is preselected; the customer can change it.
Fix: Reorder the variations in the product’s Variations tab if you want a different default. The customer can still select any other option after the page loads.

Cause: A theme or plugin may build variation attributes outside WooCommerce’s standard dropdown filter.
Fix: Confirm the dropdown renders through the standard WooCommerce variation attribute options. Custom dropdown markup that bypasses this filter will not be affected.

Frequently Asked Questions

The first option in each variation dropdown is preselected when the dropdown has options. The customer can change it to any other listed variation.

No. It only preselects a variation on the product page. Adding to cart still requires the customer to use the add to cart action.

Yes. The selected option is just a default. All variations remain selectable after the page renders.

It applies to any variable product that uses dropdown attribute selection. Each dropdown gets its first option preselected when options exist.

Sumit Your Ideas or Feature Requests

All submissions go through a manual review, so not every idea will be published. That said, the most upvoted ideas are given priority on our official roadmap.Please check if your idea already exists before submitting. If you find it, simply upvote it to help us prioritize it.