wc_update_250_currency() WC 1.0
Update currency settings for 2.5
No Hooks.
Return
null.
Usage
wc_update_250_currency();
Code of wc_update_250_currency() wc update 250 currency WC 5.0.0
function wc_update_250_currency() {
global $wpdb;
// Fix currency settings for LAK currency.
$current_currency = get_option( 'woocommerce_currency' );
if ( 'KIP' === $current_currency ) {
update_option( 'woocommerce_currency', 'LAK' );
}
// phpcs:disable WordPress.DB.SlowDBQuery
// Update LAK currency code.
$wpdb->update(
$wpdb->postmeta,
array(
'meta_value' => 'LAK',
),
array(
'meta_key' => '_order_currency',
'meta_value' => 'KIP',
)
);
// phpcs:enable WordPress.DB.SlowDBQuery
}