Same here, the plugin essentially breaks the WP admin area. The full stacktrace is:
[23-Sep-2020 05:59:53 UTC] PHP Fatal error: Uncaught Error: Call to undefined method Automattic\WooCommerce\Admin\Notes\WC_Admin_Note::set_layout() in /var/www/vhosts/…/staging.…/wp-content/plugins/mailchimp-for-woocommerce/admin/class-mailchimp-woocommerce-admin.php:312
Stack trace:
#0 /var/www/vhosts/…/staging.…/wp-includes/class-wp-hook.php(287): MailChimp_WooCommerce_Admin->initial_notice('')
#1 /var/www/vhosts/…/staging.…/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
#2 /var/www/vhosts/…/staging.…/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
#3 /var/www/vhosts/…/staging.…/wp-admin/admin-header.php(281): do_action('admin_notices')
#4 /var/www/vhosts/…/staging.…/wp-admin/plugins.php(486): require_once('/var/www/vhosts...')
#5 {main}
thrown in /var/www/vhosts/…/staging.…/wp-content/plugins/mailchimp-for-woocommerce/admin/class-mailchimp-woocommerce-admin.php on line 312
Please review that file, it looks like either a merge error or some otherwise pretty erratic code with duplications. Commenting out like below will “unblock” the WP Admin area as a workaround.
$note = new \Automattic\WooCommerce\Admin\Notes\WC_Admin_Note();
$note->set_title( __( 'Mailchimp For WooCommerce', 'mailchimp-for-woocommerce' ) );
$note->set_content(
esc_html__(
'Plugin is not yet connected to a Mailchimp account. To complete the connection, open the settings page.',
'mailchimp-for-woocommerce'
)
);
$note->set_content_data( (object) array(
'getting_started' => true,
'activated' => $activated_time,
'activated_formatted' => $activated_time_formatted,
) );
$note->set_type( \Automattic\WooCommerce\Admin\Notes\WC_Admin_Note::E_WC_ADMIN_NOTE_WARNING );
// $note->set_layout('plain');
// $note->set_image('');
$note->set_name( 'mailchimp-for-woocommerce-incomplete-install' );
$note->set_source( 'mailchimp-for-woocommerce' );
// $note->set_layout('plain');
// $note->set_image('');
$note->add_action(
'settings',
__( 'Open Settings', 'mailchimp-for-woocommerce' ),
admin_url( 'admin.php?page=') . $this->plugin_name
);
$note->save();
BR