From 48d3a1e4379a4c8dfe844d7167dd50fe44b1c36a Mon Sep 17 00:00:00 2001 From: Neil Pie Date: Thu, 7 Feb 2013 13:55:23 +0000 Subject: [PATCH] only delete the old options if we successfully update --- admin/includes/updates/woocommerce-update-2.0.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/admin/includes/updates/woocommerce-update-2.0.php b/admin/includes/updates/woocommerce-update-2.0.php index 6e5b3b86d3b..1632bd97caa 100644 --- a/admin/includes/updates/woocommerce-update-2.0.php +++ b/admin/includes/updates/woocommerce-update-2.0.php @@ -309,9 +309,8 @@ foreach ( array( 'catalog', 'single', 'thumbnail' ) as $value ) { 'crop' => get_option( 'woocommerce_' . $value . '_image_crop' ) ) ); - if ( ! empty( $old_settings ) ){ + if ( ! empty( $old_settings ) && update_option( 'shop_' . $value . '_image_size', $old_settings ) ){ - update_option( 'shop_' . $value . '_image_size', $old_settings ) ; delete_option( 'woocommerce_' . $value . '_image_width' ); delete_option( 'woocommerce_' . $value . '_image_height' ); delete_option( 'woocommerce_' . $value . '_image_crop' );