Title: Set default variation hook in functions.php
Last modified: September 2, 2016

---

# Set default variation hook in functions.php

 *  [wickcheed](https://wordpress.org/support/users/wickcheed/)
 * (@wickcheed)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/set-default-variation-hook-in-functions-php/)
 * Hello:
 * Is the a filter I can use in function.php that would allow me to set the default
   variation value of a product based on another value (which I have setup in a 
   session variable)? Folks select a piece of artwork (that is NOT a product), and
   I have a variable set to the orientation of that artwork. The products have a
   variation for orientation (square, portrait, landscape), and I’d like to be able
   to se the default of that variation select to the art work orientation value.
 * Thanks so much for any help.

The topic ‘Set default variation hook in functions.php’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [wickcheed](https://wordpress.org/support/users/wickcheed/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/set-default-variation-hook-in-functions-php/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
