Title: [Plugin: Woocommerce] Get variation dimensions
Last modified: August 31, 2016

---

# [Plugin: Woocommerce] Get variation dimensions

 *  Resolved [cisco2121](https://wordpress.org/support/users/cisco2121/)
 * (@cisco2121)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/plugin-woocommerce-get-variation-dimensions/)
 * Hi!
    I’ve an e-commerce with woocommerce and I need to get the dimension of the
   variation. With $product->get_dimension() the system get the dimension of the
   product not the variation. Someone can help me? Thank you very much!
 * ps. I’ve tried to search into the forum but I didn’t find the solution

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Bob Cristello](https://wordpress.org/support/users/gntmidnight/)
 * (@gntmidnight)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/plugin-woocommerce-get-variation-dimensions/#post-7030869)
 * Working with variable products is a little tricky, especially with the way WooCommerce
   stores this data. You might try this:
 *     ```
       global $product
       $variations = $product->get_available_variations();
       foreach ( $variations as $variable_array ){
           $variation = new WC_Product( $variable_array['variation_id'] );
           echo "The length is {$variation->length}.";
       }
       ```
   
 * Original source: [http://stackoverflow.com/questions/33509340/display-woocommerce-variable-product-dimensions](http://stackoverflow.com/questions/33509340/display-woocommerce-variable-product-dimensions)
 *  Thread Starter [cisco2121](https://wordpress.org/support/users/cisco2121/)
 * (@cisco2121)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/plugin-woocommerce-get-variation-dimensions/#post-7030895)
 * Thank you very much but I found the solution.
 * Into the add-to-cart/variable.php I put this code and everything work!
 * <tr class=”<?php if ( ( $alt = $alt * -1 ) == 1 ) echo ‘alt’; ?>”>
    <th> Height
   </th> <td class=”product_dimensions”><?php echo $product->get_dimensions(); ?
   ></td> </tr>
 *  Thread Starter [cisco2121](https://wordpress.org/support/users/cisco2121/)
 * (@cisco2121)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/plugin-woocommerce-get-variation-dimensions/#post-7030896)
 * SOLVED!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[Plugin: Woocommerce] Get variation dimensions’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [cisco2121](https://wordpress.org/support/users/cisco2121/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/plugin-woocommerce-get-variation-dimensions/#post-7030896)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
