From 84ca10e470b630ea55523fa6ee8753b8fdadfc43 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Sat, 10 Sep 2011 21:26:19 +0100 Subject: [PATCH] Cannot add variation until variation attribute selected --- admin/writepanels/writepanel-product-type-variable.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/admin/writepanels/writepanel-product-type-variable.php b/admin/writepanels/writepanel-product-type-variable.php index dedd087ec28..e2e366913e9 100644 --- a/admin/writepanels/writepanel-product-type-variable.php +++ b/admin/writepanels/writepanel-product-type-variable.php @@ -18,6 +18,7 @@ function variable_product_type_options() { global $post, $woocommerce; $attributes = maybe_unserialize( get_post_meta($post->ID, 'product_attributes', true) ); + $variation_attribute_found = false; if (!isset($attributes)) $attributes = array(); ?>
@@ -53,6 +54,8 @@ function variable_product_type_options() { if ( !$attribute['is_variation'] ) continue; + $variation_attribute_found = true; + $options = $attribute['value']; $value = get_post_meta( $variation->ID, 'tax_' . sanitize_title($attribute['name']), true ); @@ -96,8 +99,8 @@ function variable_product_type_options() {
- - + +