From ac51d1f1df06791381adb08f75b8ea7d54695f61 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 12 Feb 2019 13:27:30 +0000 Subject: [PATCH] Update routines --- includes/class-wc-install.php | 4 ++++ includes/wc-update-functions.php | 16 +++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/includes/class-wc-install.php b/includes/class-wc-install.php index e083aeffbe1..e84ee1a4d28 100644 --- a/includes/class-wc-install.php +++ b/includes/class-wc-install.php @@ -124,6 +124,10 @@ class WC_Install { 'wc_update_354_modify_shop_manager_caps', 'wc_update_354_db_version', ), + '3.6.0' => array( + 'wc_update_360_product_lookup_tables', + 'wc_update_360_db_version', + ), ); /** diff --git a/includes/wc-update-functions.php b/includes/wc-update-functions.php index 469b21f2668..5cbd4ff049e 100644 --- a/includes/wc-update-functions.php +++ b/includes/wc-update-functions.php @@ -740,7 +740,7 @@ function wc_update_240_shipping_methods() { if ( version_compare( $shipping_method->get_option( 'version', 0 ), '2.4.0', '<' ) ) { $shipping_classes = WC()->shipping()->get_shipping_classes(); $has_classes = count( $shipping_classes ) > 0; - $cost_key = $has_classes ? 'no_class_cost': 'cost'; + $cost_key = $has_classes ? 'no_class_cost' : 'cost'; $min_fee = $shipping_method->get_option( 'minimum_fee' ); $math_cost_strings = array( 'cost' => array(), @@ -1932,3 +1932,17 @@ function wc_update_354_modify_shop_manager_caps() { function wc_update_354_db_version() { WC_Install::update_db_version( '3.5.4' ); } + +/** + * Update product lookup tables in bulk. + */ +function wc_update_360_product_lookup_tables() { + wc_update_product_lookup_tables(); +} + +/** + * Update DB Version. + */ +function wc_update_360_db_version() { + WC_Install::update_db_version( '3.6.0' ); +}