将php从5.2升级到7.2后,在woocomeerce上检查出内部服务器错误时,当我在woocommerce中检查错误日志时,会显示以下内容。
CRITICAL Uncaught ArgumentCountError: Too few arguments to function iwc_display_payment_method_email_order(), 1 passed in /home/content/n3pnexwpnas04_data01/18/41356818/html/wp-includes/class-wp-hook.php on line 288 and exactly 2 expected in /home/content/n3pnexwpnas04_data01/18/41356818/html/wp-content/themes/lensa/functions.php:133
Stack trace:
#0 /home/content/n3pnexwpnas04_data01/18/41356818/html/wp-includes/class-wp-hook.php(288): iwc_display_payment_method_email_order(Object(WC_Order))
#1 /home/content/n3pnexwpnas04_data01/18/41356818/html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#2 /home/content/n3pnexwpnas04_data01/18/41356818/html/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#3 /home/content/n3pnexwpnas04_data01/18/41356818/html/wp-content/themes/lensa/woocommerce/emails/email-order-details.php(89): do_action('woocommerce_ema...', Object(WC_Order), true, false, Object(WC_Email_New_Order))
#4 /home/content/n3pnexwpnas04_data01/18/41356818/html/wp-content/plugins/woocomm in /home/content/n3pnexwpnas04_data01/18/41356818/html/wp-content/themes/lensa/functions.php on line 133
答案 0 :(得分:0)
您无法以这种方式轻松更新Wordpress。您必须更新软件和所有依赖项,并使它们与PHP 7.2兼容。因此,在切换到最新版本之前,请先更新Wordpress和所有插件。
然后,您可以切换您的PHP版本并尝试解决所有其他问题。我认为您的情况向前迈出了一大步。您应该安装一个新的Wordpress并尝试逐步迁移所有插件并解决问题。