Woocommerce fatal error trying to update

I am trying to update woocommerce but after updating, I am getting an error Fatal error: Call to a member function get_settings() on a non-object in /home/public_html/wp-content/plugins/woocommerce/includes/class-wc-install.php on line 292
when trying to access the admin area.

If I revert back to the previously installed version, the error goes away.

I looked at the line ` /**
* Default options
*
* Sets up the default options used on the settings page
*
* @access public
*/
function create_options() {
// Include settings so that we can run through defaults
include_once( 'admin/class-wc-admin-settings.php' );

$settings = WC_Admin_Settings::get_settings_pages();

foreach ( $settings as $section ) {
foreach ( $section->get_settings() as $value ) {
if ( isset( $value['default'] ) && isset( $value['id'] ) ) {
$autoload = isset( $value['autoload'] ) ? (bool) $value['autoload'] : true;
add_option( $value['id'], $value['default'], '', ( $autoload ? 'yes' : 'no' ) );
}
}

// Special case to install the inventory settings.
if ( $section instanceof WC_Settings_Products ) {
foreach ( $section->get_settings( 'inventory' ) as $value ) {
if ( isset( $value['default'] ) && isset( $value['id'] ) ) {
$autoload = isset( $value['autoload'] ) ? (bool) $value['autoload'] : true;
add_option( $value['id'], $value['default'], '', ( $autoload ? 'yes' : 'no' ) );
}
}
}
}
}`

It is the same as the previous version.

Any help in figuring out what this means?

Thank you!