wc_update_230_options

The WooCommerce wc update 230 options function.

Description

wc_update_230_options(); 

Usage

  1. if ( !function_exists( 'wc_update_230_options' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-update-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wc_update_230_options(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-update-functions.php  
  1. function wc_update_230_options() { 
  2. // _money_spent and _order_count may be out of sync - clear them 
  3. delete_metadata( 'user', 0, '_money_spent', '', true ); 
  4. delete_metadata( 'user', 0, '_order_count', '', true ); 
  5.  
  6. // To prevent taxes being hidden when using a default 'no address' in a store with tax inc prices, set the woocommerce_default_customer_address to use the store base address by default 
  7. if ( '' === get_option( 'woocommerce_default_customer_address', false ) && wc_prices_include_tax() ) { 
  8. update_option( 'woocommerce_default_customer_address', 'base' );