Fatal error: Cannot declare class MYCLASS Woocommerce Settings
-
I have a website, and when I go to the WordPress admin page and click on woocommerce-settings it shows this error:
Fatal error: Cannot declare class WC_Settings_General, because the name is already in use in /(hosting)/website/wp-content/plugins/woocommerce/includes/admin/settings/class-wc-settings-general.php on line 0 The site is experiencing technical difficulties. Please check your site admin email inbox for instructions.
The beginning of class-wc-settings-general.php looks like this:
<?php /** * WooCommerce General Settings * * @package WooCommerce/Admin */ defined( 'ABSPATH' ) || exit; if ( class_exists( 'WC_Settings_General', false ) ) { return new WC_Settings_General(); } /** * WC_Admin_Settings_General. */ class WC_Settings_General extends WC_Settings_Page { /** * Constructor. */ public function __construct() { $this->id = 'general'; $this->label = __( 'General', 'woocommerce' ); parent::__construct(); } /** * Get settings array. * * @return array */ public function get_settings() {
etc. The webpage url that is generating this error is: https://www.(mywebsite).com/wp-admin/admin.php?page=wc-settings
I need to know how to resolve this issue and get to the woocommerce settings. I have other websites that have woocommerce and do not have this issue, and I do not know where the other place it is declared would be.
If you need to know the list of plugins, please, let me know.
Please do not flag as a duplicate post as this is a very specific issue regarding woocommerce and WordPress that the other posts I have looked at (around 8 others) do not fix. I have checked for require to change to require_once
Thank you in advance!
The page I need help with: [log in to see the link]
- The topic ‘Fatal error: Cannot declare class MYCLASS Woocommerce Settings’ is closed to new replies.