×
Black Friday Savings
00Days
:
15Hours
:
45Minutes
:
24Seconds
Use Coupon 40%OFF

Includes 1 Year Priority Support

Shop Now

WP SITES

3093 Coded Tutorials & 296 Plugins

Set Default Variation in WooCommerce

The code in this download folder sets the 1st variation as the default variation in the variation option drop down menu on the single product page in WooCommerce.

Set variation default woocommerce single product page

There’s 2 solutions included. The

  1. 1st solution only works with a specific variation attribute key ( name ).
  2. 2nd solution works with any/all variations regardless of the variation attribute names.

Demo Video

Shows the first variation set as the default in the variation attribute option menu on the single product page.

Installation

There’s 2 steps :

  1. Upload the folder named variation-default to your child theme folder.
  2. Copy and paste the PHP code ( without the opening PHP tag ) to the end of your child themes functions file.

Download Folder

Was this helpful?

Yes
No
Thanks for your feedback!

Leave a Reply