# Use Plain Dropdowns Instead of Select2 at Checkout

> Removes the Select2 search boxes WooCommerce puts on the country and state fields, using the browser's native dropdowns that are lighter and easier on phones.

- Type: PHP
- Runs: Run everywhere
- Category: [WooCommerce](https://wpide.com/library/category/woocommerce/)
- Requires: WooCommerce
- Tags: woocommerce, checkout, performance, accessibility
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/woo-native-country-selects/

## Code

```php
add_action( 'wp_enqueue_scripts', function () {
    if ( ! function_exists( 'is_checkout' ) || ! ( is_checkout() || is_account_page() || is_cart() ) ) {
        return;
    }

    wp_dequeue_style( 'select2' );
    wp_dequeue_script( 'selectWoo' );
    wp_dequeue_script( 'select2' );
}, 100 );
```

## Notes

Country and state fields still update each other, and native dropdowns work better with screen readers and phone keyboards.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Use Plain Dropdowns Instead of Select2 at Checkout" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
