WC_Install::update_db_version PHP Method

update_db_version() public static method

Update DB version to current.
public static update_db_version ( string $version = null )
$version string
    public static function update_db_version($version = null)
    {
        delete_option('woocommerce_db_version');
        add_option('woocommerce_db_version', is_null($version) ? WC()->version : $version);
    }

Usage Example

 /**
  * Complete
  *
  * Override if applicable, but ensure that the below actions are
  * performed, or, call parent::complete().
  */
 protected function complete()
 {
     $logger = new WC_Logger();
     $logger->add('wc_db_updates', 'Data update complete');
     WC_Install::update_db_version();
     parent::complete();
 }
All Usage Examples Of WC_Install::update_db_version