我有一個網站,當我轉到 WordPress 管理頁面并單擊 woocommerce-settings 時,它顯示此錯誤:致命錯誤:無法聲明類 WC_Settings_General,因為該名稱已在 /(hosting)/website/wp-content/plugins/woocommerce/includes/admin/settings/class-wc-settings-general.php on line 0 中使用網站遇到技術問題。請檢查您的站點管理員電子郵件收件箱以獲取說明。class-wc-settings-general.php 的開頭是這樣的:<?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() { 等等。產生這個錯誤的網頁網址是: https://www.(mywebsite).com/wp-admin/admin.php?page=wc-settings我需要知道如何解決這個問題并進入 woocommerce 設置。我有其他網站有 woocommerce 并且沒有這個問題,我不知道它被聲明的其他地方在哪里。如果您需要知道插件列表,請告訴我。請不要標記為重復的帖子,因為這是關于 woocommerce 和 WordPress 的一個非常具體的問題,我看過的其他帖子(大約 8 個其他帖子)沒有解決。我已檢查require更改為require_once先感謝您!
致命錯誤:無法聲明類 MYCLASS Woocommerce 設置
慕工程0101907
2022-01-02 15:42:59