From 544060c0f2649c194835599a4060579bd509c7e9 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Wed, 15 Mar 2017 13:55:07 -0300 Subject: [PATCH] Updated upgrade script from 2.7 to 3.0 --- includes/class-wc-install.php | 14 +++++++------- includes/wc-update-functions.php | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/includes/class-wc-install.php b/includes/class-wc-install.php index d9baf5955c4..e8e2672412c 100644 --- a/includes/class-wc-install.php +++ b/includes/class-wc-install.php @@ -5,7 +5,7 @@ * @author WooThemes * @category Admin * @package WooCommerce/Classes - * @version 2.4.1 + * @version 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { @@ -72,12 +72,12 @@ class WC_Install { 'wc_update_260_refunds', 'wc_update_260_db_version', ), - '2.7.0' => array( - 'wc_update_270_webhooks', - 'wc_update_270_grouped_products', - 'wc_update_270_settings', - 'wc_update_270_product_visibility', - 'wc_update_270_db_version', + '3.0.0' => array( + 'wc_update_300_webhooks', + 'wc_update_300_grouped_products', + 'wc_update_300_settings', + 'wc_update_300_product_visibility', + 'wc_update_300_db_version', ), ); diff --git a/includes/wc-update-functions.php b/includes/wc-update-functions.php index 06c3d827fbc..c6fdd603caf 100644 --- a/includes/wc-update-functions.php +++ b/includes/wc-update-functions.php @@ -973,7 +973,7 @@ function wc_update_260_db_version() { WC_Install::update_db_version( '2.6.0' ); } -function wc_update_270_webhooks() { +function wc_update_300_webhooks() { /** * Make sure product.update webhooks get the woocommerce_product_quick_edit_save * and woocommerce_product_bulk_edit_save hooks. @@ -996,7 +996,7 @@ function wc_update_270_webhooks() { * * @return null */ -function wc_update_270_comment_type_index() { +function wc_update_300_comment_type_index() { global $wpdb; $index_exists = $wpdb->get_row( "SHOW INDEX FROM {$wpdb->comments} WHERE column_name = 'comment_type' and key_name = 'woo_idx_comment_type'" ); @@ -1008,7 +1008,7 @@ function wc_update_270_comment_type_index() { } } -function wc_update_270_grouped_products() { +function wc_update_300_grouped_products() { global $wpdb; $parents = $wpdb->get_col( "SELECT DISTINCT( post_parent ) FROM {$wpdb->posts} WHERE post_parent > 0 AND post_type = 'product';" ); foreach ( $parents as $parent_id ) { @@ -1025,7 +1025,7 @@ function wc_update_270_grouped_products() { } } -function wc_update_270_settings() { +function wc_update_300_settings() { $woocommerce_shipping_tax_class = get_option( 'woocommerce_shipping_tax_class' ); if ( '' === $woocommerce_shipping_tax_class ) { update_option( 'woocommerce_shipping_tax_class', 'inherit' ); @@ -1037,7 +1037,7 @@ function wc_update_270_settings() { /** * Convert meta values into term for product visibility. */ -function wc_update_270_product_visibility() { +function wc_update_300_product_visibility() { global $wpdb; if ( $featured_term = get_term_by( 'name', 'featured', 'product_visibility' ) ) { @@ -1080,6 +1080,6 @@ function wc_update_270_product_visibility() { /** * Update DB Version. */ -function wc_update_270_db_version() { - WC_Install::update_db_version( '2.7.0' ); +function wc_update_300_db_version() { + WC_Install::update_db_version( '3.0.0' ); }