WC_Install::update() – Push all needed DB updates to the queue for processing.

You appear to be a bot. Output may be restricted

Description

Push all needed DB updates to the queue for processing.

Usage

WC_Install::update();

Parameters

Returns

void

Source

File name: woocommerce/includes/class-wc-install.php
Lines:

1 to 20 of 20
  private static function update() {
    $current_db_version = get_option( 'woocommerce_db_version' );
    $loop               = 0;

    foreach ( self::get_db_update_callbacks() as $version => $update_callbacks ) {
      if ( version_compare( $current_db_version, $version, '<' ) ) {
        foreach ( $update_callbacks as $update_callback ) {
          WC()->queue()->schedule_single(
            time() + $loop,
            'woocommerce_run_update_callback',
            array(
              'update_callback' => $update_callback,
            ),
            'woocommerce-db-updates'
          );
          $loop++;
        }
      }
    }
  }
 

 View on GitHub View on Trac