本主題已關閉

網站遭遇技術性問題

發佈日期 2023-05-15 分類 綠界電子發票
3 2023-05-11

您好:

訂單在結下來的同時,會跳這個錯誤訊息在Fatal error 跟email通知


2023-05-11T13:46:18+00:00 CRITICAL Uncaught TypeError: json_decode(): Argument #1 ($json) must be of type string, array given in xxxx/wp-content/plugins/cw-ecpay-ei/includes/class-action.php:169

Stack trace:

#0 xxxx/wp-content/plugins/cw-ecpay-ei/includes/class-action.php(169): json_decode()

#1 xxxx/wp-content/plugins/cw-ecpay-ei/includes/class-action.php(291): cloudwp\ECPay\EI\Action::InvalidReceipt()

#2 xxxx/wp-includes/class-wp-hook.php(310): cloudwp\ECPay\EI\Action::OrderStatusChanged()
  • 說讚的人有
0 2023-05-11

你好

麻煩清楚描述問題,我不太懂「訂單在結下來的同時」是什麼意思

看動作歷程,你應該是將訂單改為作廢發票的狀態

另外,json_decode 的錯誤並不會造成 PHP fatal error,而是 warning

PHP fatal error 會讓整個網站停在發生重大錯誤或是整個白畫面,warning 不會

PHP Warning: json_decode() expects parameter 1 to be string, array given

  • 說讚的人有
取消
1 2023-05-11

抱歉,是取消訂單的時候發生,因為忙著在處理消費者無法結帳

取消訂單的時候,整個頁面會跳技術性問題,信件裡面會顯示以下錯誤:

檔案 /xxxx/wp-content/plugins/cw-ecpay-ei/includes/class-action.php 的第 169 行發生錯誤 (錯誤類型: E_ERROR)。錯誤訊息: Uncaught TypeError: json_decode(): Argument #1 ($json) must be of type string, array given in xxxx/wp-content/plugins/cw-ecpay-ei/includes/class-action.php:169
Stack trace:
#0 xxxx/wp-content/plugins/cw-ecpay-ei/includes/class-action.php(169): json_decode()
#1 xxxx/wp-content/plugins/cw-ecpay-ei/includes/class-action.php(291): cloudwp\ECPay\EI\Action::InvalidReceipt()
#2 xxxx/wp-includes/class-wp-hook.php(310): cloudwp\ECPay\EI\Action::OrderStatusChanged()
#3 xxxx/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#4 xxxx/wp-includes/plugin.php(517): WP_Hook->do_action()
#5 xxxx/wp-content/plugins/woocommerce/includes/class-wc-order.php(397): do_action()
#6 xxxx/wp-content/plugins/woocommerce/includes/class-wc-order.php(245): WC_Order->status_transition()
#7xxxx/wp-content/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-data.php(699): WC_Order->save()
#8 xxxx/wp-includes/class-wp-hook.php(310): WC_Meta_Box_Order_Data::save()
#9 xxxx/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#10 xxxx/wp-includes/plugin.php(517): WP_Hook->do_action()
#11 xxxx/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-meta-boxes.php(258): do_action()
#12 xxxx/wp-includes/class-wp-hook.php(310): WC_Admin_Meta_Boxes->save_meta_boxes()
#13 xxxx/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#14 xxxx/wp-includes/plugin.php(517): WP_Hook->do_action()
#15 xxxx/wp-includes/post.php(4715): do_action()
#16 xxxx/wp-includes/post.php(4817): wp_insert_post()
#17 xxxx/wp-admin/includes/post.php(439): wp_update_post()
#18 xxxx/wp-admin/post.php(227): edit_post()
#19 {main}
thrown

ADM
2023-05-15

你好

我這裡會再測試過取消訂單作廢發票的狀況

若有新的修正會再發布更新版本

顯示更多回覆
  • 說讚的人有
取消