感谢您的帮助
致命错误: AtWCTourDataStoreCPT :: read_children()的访问级别必须是/ home3 / abrobadg / public_html / wp-content / themes / adventure-tours / includes中的公共(如类WC_Product_Variable_Data_Store_CPT)第58行/classes/AtWCTourDataStoreCPT.php
答案 0 :(得分:2)
首先对此文件进行备份/复制:\wp-content\themes\adventure-tours\includes\classes\AtWCTourDataStoreCPT.php
将这两个功能的可见性从受保护的公开更改为第25和29行,如下所示:
protected function read_children (...” to “public function read_children (....
和强>
protected function read_variation_attributes( ....” to “public function read_variation_attributes( ....
它对我有用
答案 1 :(得分:0)
为read_parent_attributes更改read_parent的read_children和read_variation_attributes,如下面的代码所示:
受保护的函数read_parent(& $ product,$ force_read = false){ 返回$ this-> is_variable($ product)? parent :: parent($ product,$ force_read):array(); }
受保护的函数read_parent_attributes(& $ product){ 返回$ this-> is_variable($ product)? parent :: read_variation_attributes($ product):array(); }