Woocommerce 致命错误:对…的访问级别:read_children()必须是公共的(如在课堂上……)
我有个问题 更新后,出现了此问题 我感谢你的帮助 致命错误:第58行的/home3/abrobadg/public\u html/wp content/themes/adventure tours/includes/classes/AtWCTourDataStoreCPT.php中的AtWCTourDataStoreCPT::read_children()访问级别必须是公共的(如WC_Product\u Variable\u Data\u storecpt类)Woocommerce 致命错误:对…的访问级别:read_children()必须是公共的(如在课堂上……),woocommerce,fatal-error,Woocommerce,Fatal Error,我有个问题 更新后,出现了此问题 我感谢你的帮助 致命错误:第58行的/home3/abrobadg/public\u html/wp content/themes/adventure tours/includes/classes/AtWCTourDataStoreCPT.php中的AtWCTourDataStoreCPT::read_children()访问级别必须是公共的(如WC_Product\u Variable\u Data\u storecpt类) 首先备份/复制此文件:\wp
\wp content\themes\adventure tours\includes\classes\AtWCTourDataStoreCPT.php
protectedfunction read_children(…)到“public function read_children(…)
和
protected function read_variation_attributes(....)到“public function read_variation_attributes(..)
它对我有用
\wp content\themes\adventure tours\includes\classes\AtWCTourDataStoreCPT.php
protectedfunction read_children(…)到“public function read_children(…)
和
protected function read_variation_attributes(....)到“public function read_variation_attributes(..)
这对我很有效将read\u children更改为read\u parent,将read\u variation\u属性更改为read\u parent\u属性,如下代码所示: 受保护的函数读取父项(&$product,$force\u read=false){ return$this->is_variable($product)?parent::parent($product,$force_read):array(); } 受保护的函数读取父属性(&$product){ return$this->is_variable($product)?parent::read_variation_attributes($product):array();
}更改“读取父项”的“读取子项”和“读取父项”属性的“读取变体”属性,如下代码所示: 受保护的函数读取父项(&$product,$force\u read=false){ return$this->is_variable($product)?parent::parent($product,$force_read):array(); } 受保护的函数读取父属性(&$product){ return$this->is_variable($product)?parent::read_variation_attributes($product):array();
}此错误与您的主题相关…您应该报告。StackOverFlow不处理任何支持软件此错误与您的主题相关…您应该报告。StackOverFlow不处理任何支持软件