【问题标题】:Fatal error: Cannot make non static method致命错误:无法制作非静态方法
【发布时间】:2021-01-14 14:39:19
【问题描述】:

致命错误:无法在 /home2/juliegil/public_html/wp-content/plugins/lastudio/includes/extensions/swatch/class-lastudio-swatch-widget 中的类 LaStudio_Swatch_Widget 中使非静态方法 WC_Widget_Layered_Nav::get_main_search_query_sql() 成为静态方法.php 在第 397 行

enter image description here enter image description here

【问题讨论】:

    标签: wordpress error-handling cpanel


    【解决方案1】:

    WC_Widget_Layered_Nav 不提供任何 get_main_search_query_sql 方法。你需要使用WC_Query

    WC_Query::get_main_search_query_sql();
    

    【讨论】:

    • 您好,您在代码中哪里看到这个错误?谢谢!
    • 请访问该链接 woocommerce.github.io/code-reference/files/…>,WC_Widget_Layered_Nav 提供了一个非静态的受保护方法 get_main_search_query_sql。
    猜你喜欢
    • 1970-01-01
    • 2022-01-22
    • 2013-03-31
    • 2019-07-13
    • 1970-01-01
    • 2012-08-02
    • 1970-01-01
    • 2015-06-20
    • 2023-02-08
    相关资源
    最近更新 更多