admin管理员组文章数量:1130349
I am getting an error on the cart page "Call to undefined method WooCommerce::nonce_field()".
Fatal error: Call to undefined method WooCommerce::nonce_field() in C:\xampp\htdocs\stemorg\wp-content\themes\breeze-child\woocommerce\cart\cart.php on line 120
cart.php on line 120 here is the code: $woocommerce->nonce_field('cart');
I am very tired of this error. Please, anyone, help me how to fix this error. Thanks in advance
I am getting an error on the cart page "Call to undefined method WooCommerce::nonce_field()".
Fatal error: Call to undefined method WooCommerce::nonce_field() in C:\xampp\htdocs\stemorg\wp-content\themes\breeze-child\woocommerce\cart\cart.php on line 120
cart.php on line 120 here is the code: $woocommerce->nonce_field('cart');
I am very tired of this error. Please, anyone, help me how to fix this error. Thanks in advance
Share Improve this question asked Dec 22, 2018 at 7:20 Rakesh PatidarRakesh Patidar 433 bronze badges 1- change ” $woocommerce->nonce_field ” to “wp_nonce_field” – vikrant zilpe Commented Dec 22, 2018 at 7:55
1 Answer
Reset to default 1The Products section in wp-admin panel doesn’t depend on the theme. If you select default WordPress theme you’ll see the same issue. This is WordPress configuration. To fix the errors you need edit files via FTP, open the file wp-content/themes/your_theme/woocommerce/cart/shipping-calculator.php on line 67 and replace
$woocommerce->nonce_field
with
wp_nonce_field
and the file wp-content/themes/your_theme/woocommerce/checkout/form-checkout.php on line 3 and replace
$woocommerce->show_messages();
with
wc_print_notices();
I am getting an error on the cart page "Call to undefined method WooCommerce::nonce_field()".
Fatal error: Call to undefined method WooCommerce::nonce_field() in C:\xampp\htdocs\stemorg\wp-content\themes\breeze-child\woocommerce\cart\cart.php on line 120
cart.php on line 120 here is the code: $woocommerce->nonce_field('cart');
I am very tired of this error. Please, anyone, help me how to fix this error. Thanks in advance
I am getting an error on the cart page "Call to undefined method WooCommerce::nonce_field()".
Fatal error: Call to undefined method WooCommerce::nonce_field() in C:\xampp\htdocs\stemorg\wp-content\themes\breeze-child\woocommerce\cart\cart.php on line 120
cart.php on line 120 here is the code: $woocommerce->nonce_field('cart');
I am very tired of this error. Please, anyone, help me how to fix this error. Thanks in advance
Share Improve this question asked Dec 22, 2018 at 7:20 Rakesh PatidarRakesh Patidar 433 bronze badges 1- change ” $woocommerce->nonce_field ” to “wp_nonce_field” – vikrant zilpe Commented Dec 22, 2018 at 7:55
1 Answer
Reset to default 1The Products section in wp-admin panel doesn’t depend on the theme. If you select default WordPress theme you’ll see the same issue. This is WordPress configuration. To fix the errors you need edit files via FTP, open the file wp-content/themes/your_theme/woocommerce/cart/shipping-calculator.php on line 67 and replace
$woocommerce->nonce_field
with
wp_nonce_field
and the file wp-content/themes/your_theme/woocommerce/checkout/form-checkout.php on line 3 and replace
$woocommerce->show_messages();
with
wc_print_notices();
本文标签: Fatal error Call to undefined method WooCommercenoncefield()
版权声明:本文标题:Fatal error: Call to undefined method WooCommerce::nonce_field() 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749076353a2312367.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论