自从Woocommerce发布了Woocommerce 3.0,Klarnas pay插件就无法工作了。
例如,我得到了这个错误。
注意:国家/地区调用不正确。不应直接访问客户属性。回溯: require('wp-blog-header.php'),require_once('wp-includes/template-loader.php'),include(‘/themes/ require('/themes/twentyseventeen/template-parts/page/content-page.php'),the_content/page.php’),get_template_part,locate_template,load_template,get_template_part the_content,apply_filters('the_content'),WP_Hook->apply_filters,do_shortcode,preg_replace_callback,do_shortcode_tag,WC_Shortcodes::checkout,include('/plugins/woocommerce/templates/checkout/form-checkout.php'),do_action('woocommerce_checkout_order_review'),WP_Hook->do_action,WP_Hook->apply_filters,WC_Payment_Gateways->get_available_payment_gateways,WC_ WC_Shortcodes::shortcode_wrapper _ WC_Shortcode_Checkout::output _ WC_Shortcode_Checkout::checkout _ wc_get_template ->is_ woocommerce_checkout_payment,第4138行上的WC_Gateway_Klarna_Part_Payment->check_required_fields,WC_网关_Klarna_帮助器->get_eid、WC_传统客户-在/mnt/persist/www/dev10/wp-includes/functions.php中
和
注意:从3.0版本开始,WC_Customer::get_country就被弃用了!请改用WC_Customer::get_billing_country。在第3830行的/mnt/persist/www/dev10/wp-includes/functions.php中
注意:从3.0版本开始,WC_Customer::get_country就被弃用了!请改用WC_Customer::get_billing_country。在第3830行的/mnt/persist/www/dev10/wp-includes/functions.php中
注意:从3.0版本开始,WC_Customer::get_country就被弃用了!请改用WC_Customer::get_billing_country。在第3830行的/mnt/persist/www/dev10/wp-includes/functions.php中
注意:从3.0版本开始,WC_Customer::get_country就被弃用了!请改用WC_Customer::get_billing_country。在第3830行的/mnt/persist/www/dev10/wp-includes/functions.php中
注意:从3.0版本开始,WC_Customer::get_country就被弃用了!请改用WC_Customer::get_billing_country。在/mnt/persist/www/dev10/wp-includes/functions.php的第3830行。
有没有人有解决这个问题的办法?
谢谢!
发布于 2017-05-02 21:19:28
正如我在评论中所说的,你真的应该让Klarna来修复他们插件中的错误。然而,对于你的其他问题,它很容易解决。至少对我来说是这样。
只需在您的主题和插件文件中搜索get_country(即可。将您找到的所有内容替换为get_billing_country(。我在我的主题文件中引用了这一点。在更改它之后,错误就消失了。
https://stackoverflow.com/questions/43586151
复制相似问题