如何修复错误“调用不正确,不应直接访问”?

时间:2018-07-31 作者:Nxlevel

Recently my woocommerce has been throwing errors all of a sudden. no changes were made to the website or server.

When customers try to run a transaction, they get the following error "Transaction Failed. There was a problem running your transaction. C: nonp" I have no idea what "C: nonp" means. I have never seen this error before!

I check my error log afterwards and found a bunch of fields errors were called incorrectly. Order properties should not be accessed directly. As seen below;

[31-Jul-2018 19:28:51 UTC] order_total was called incorrectly. Order properties should not be accessed directly. Backtrace: require(\'wp-blog-header.php\'), require_once(\'wp-includes/template-loader.php\'), do_action(\'template_redirect\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::do_wc_ajax, do_action(\'wc_ajax_checkout\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, woocommerce_pnpdirect->process_payment, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0. [31-Jul-2018 19:28:51 UTC] billing_email was called incorrectly. Order properties should not be accessed directly. Backtrace: require(\'wp-blog-header.php\'), require_once(\'wp-includes/template-loader.php\'), do_action(\'template_redirect\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::do_wc_ajax, do_action(\'wc_ajax_checkout\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, woocommerce_pnpdirect->process_payment, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0. [31-Jul-2018 19:28:51 UTC] billing_address_1 was called incorrectly. Order properties should not be accessed directly. Backtrace: require(\'wp-blog-header.php\'), require_once(\'wp-includes/template-loader.php\'), do_action(\'template_redirect\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::do_wc_ajax, do_action(\'wc_ajax_checkout\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, woocommerce_pnpdirect->process_payment, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0. [31-Jul-2018 19:28:51 UTC] billing_address_2 was called incorrectly. Order properties should not be accessed directly. Backtrace: require(\'wp-blog-header.php\'), require_once(\'wp-includes/template-loader.php\'), do_action(\'template_redirect\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::do_wc_ajax, do_action(\'wc_ajax_checkout\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, woocommerce_pnpdirect->process_payment, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0. [31-Jul-2018 19:28:51 UTC] billing_postcode was called incorrectly. Order properties should not be accessed directly. Backtrace: require(\'wp-blog-header.php\'), require_once(\'wp-includes/template-loader.php\'), do_action(\'template_redirect\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::do_wc_ajax, do_action(\'wc_ajax_checkout\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, woocommerce_pnpdirect->process_payment, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0. [31-Jul-2018 19:28:51 UTC] billing_city was called incorrectly. Order properties should not be accessed directly. Backtrace: require(\'wp-blog-header.php\'), require_once(\'wp-includes/template-loader.php\'), do_action(\'template_redirect\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::do_wc_ajax, do_action(\'wc_ajax_checkout\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, woocommerce_pnpdirect->process_payment, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0. [31-Jul-2018 19:28:51 UTC] billing_state was called incorrectly. Order properties should not be accessed directly. Backtrace: require(\'wp-blog-header.php\'), require_once(\'wp-includes/template-loader.php\'), do_action(\'template_redirect\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::do_wc_ajax, do_action(\'wc_ajax_checkout\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, woocommerce_pnpdirect->process_payment, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0. [31-Jul-2018 19:28:51 UTC] billing_country was called incorrectly. Order properties should not be accessed directly. Backtrace: require(\'wp-blog-header.php\'), require_once(\'wp-includes/template-loader.php\'), do_action(\'template_redirect\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::do_wc_ajax, do_action(\'wc_ajax_checkout\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, woocommerce_pnpdirect->process_payment, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0. [31-Jul-2018 19:28:51 UTC] shipping_first_name was called incorrectly. Order properties should not be accessed directly. Backtrace: require(\'wp-blog-header.php\'), require_once(\'wp-includes/template-loader.php\'), do_action(\'template_redirect\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::do_wc_ajax, do_action(\'wc_ajax_checkout\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, woocommerce_pnpdirect->process_payment, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0. [31-Jul-2018 19:28:51 UTC] shipping_last_name was called incorrectly. Order properties should not be accessed directly. Backtrace: require(\'wp-blog-header.php\'), require_once(\'wp-includes/template-loader.php\'), do_action(\'template_redirect\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::do_wc_ajax, do_action(\'wc_ajax_checkout\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, woocommerce_pnpdirect->process_payment, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0. [31-Jul-2018 19:28:51 UTC] shipping_address_1 was called incorrectly. Order properties should not be accessed directly. Backtrace: require(\'wp-blog-header.php\'), require_once(\'wp-includes/template-loader.php\'), do_action(\'template_redirect\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::do_wc_ajax, do_action(\'wc_ajax_checkout\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, woocommerce_pnpdirect->process_payment, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0. [31-Jul-2018 19:28:51 UTC] shipping_address_2 was called incorrectly. Order properties should not be accessed directly. Backtrace: require(\'wp-blog-header.php\'), require_once(\'wp-includes/template-loader.php\'), do_action(\'template_redirect\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::do_wc_ajax, do_action(\'wc_ajax_checkout\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, woocommerce_pnpdirect->process_payment, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0. [31-Jul-2018 19:28:51 UTC] shipping_postcode was called incorrectly. Order properties should not be accessed directly. Backtrace: require(\'wp-blog-header.php\'), require_once(\'wp-includes/template-loader.php\'), do_action(\'template_redirect\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::do_wc_ajax, do_action(\'wc_ajax_checkout\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, woocommerce_pnpdirect->process_payment, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0. [31-Jul-2018 19:28:51 UTC] shipping_postcode was called incorrectly. Order properties should not be accessed directly. Backtrace: require(\'wp-blog-header.php\'), require_once(\'wp-includes/template-loader.php\'), do_action(\'template_redirect\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::do_wc_ajax, do_action(\'wc_ajax_checkout\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, woocommerce_pnpdirect->process_payment, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0. [31-Jul-2018 19:28:51 UTC] shipping_state was called incorrectly. Order properties should not be accessed directly. Backtrace: require(\'wp-blog-header.php\'), require_once(\'wp-includes/template-loader.php\'), do_action(\'template_redirect\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::do_wc_ajax, do_action(\'wc_ajax_checkout\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, woocommerce_pnpdirect->process_payment, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0. [31-Jul-2018 19:28:51 UTC] shipping_country was called incorrectly. Order properties should not be accessed directly. Backtrace: require(\'wp-blog-header.php\'), require_once(\'wp-includes/template-loader.php\'), do_action(\'template_redirect\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::do_wc_ajax, do_action(\'wc_ajax_checkout\'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, woocommerce_pnpdirect->process_payment, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0.

Please help. I have been trying to fix this issue by checking pluggins, updates, cache, nothing works.

1 个回复
最合适的回答,由SO网友:Nxlevel 整理而成

我能找出问题所在。它来自信用卡处理器。我们的信用卡已过期,帐户未更新,所以他们禁用了我们的帐户,不允许我们通过他们的网关处理交易。

我们使用的公司是Plug n Pay

以“C:nonp”结尾的错误表示“未付款”。

希望这能帮助其他遇到这种情况的人。

结束