parent
792dd9d7d1
commit
c04443c2d3
|
@ -25,7 +25,8 @@ class WC_Install {
|
|||
'2.2.0' => 'updates/woocommerce-update-2.2.php',
|
||||
'2.3.0' => 'updates/woocommerce-update-2.3.php',
|
||||
'2.4.0' => 'updates/woocommerce-update-2.4.php',
|
||||
'2.4.1' => 'updates/woocommerce-update-2.4.1.php'
|
||||
'2.4.1' => 'updates/woocommerce-update-2.4.1.php',
|
||||
'2.5.0' => 'updates/woocommerce-update-2.5.php',
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
/**
|
||||
* Update WC to 2.5.0
|
||||
*
|
||||
* @author WooThemes
|
||||
* @category Admin
|
||||
* @package WooCommerce/Admin/Updates
|
||||
* @version 2.5.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
global $wpdb;
|
||||
|
||||
// Fix currency settings for LAK currency.
|
||||
$current_currency = get_option( 'woocommerce_currency' );
|
||||
|
||||
if ( 'KIP' === $current_currency ) {
|
||||
update_option( 'woocommerce_currency', 'LAK' );
|
||||
}
|
||||
|
||||
// Update LAK currency code.
|
||||
$wpdb->update(
|
||||
$wpdb->postmeta,
|
||||
array(
|
||||
'meta_value' => 'LAK'
|
||||
),
|
||||
array(
|
||||
'meta_key' => '_order_currency',
|
||||
'meta_value' => 'KIP'
|
||||
)
|
||||
);
|
Loading…
Reference in New Issue