Skip to content

v3.5.4

Choose a tag to compare

@j7-dev j7-dev released this 09 May 09:49
· 62 commits to master since this release

🐛 修正

LINE Pay HPOS 下 confirm 階段金額比對誤判,每筆訂單必失敗(#110 / #111

  • 根因:includes/line-pay-for-woo/includes/class-wc-gateway-linepay.phpprocess_payment_confirm()$order->get_meta( '_order_total' ) 取金額。_order_total 是 WooCommerce 核心欄位,HPOS 啟用後存放於 wc_orders.total_amount 而非 wp_postmetaget_meta() 回傳空字串,導致與 LINE Pay 回傳金額比對永久失敗
  • 影響:啟用 HPOS 的站台,所有 LINE Pay 訂單在 confirm 階段被誤判,狀態被改成 on-hold + _linepay_payment_status: failed,order note 出現誤導性的 linepay return code is 1150(與實際 API 回應無關)
  • 修補:改用 HPOS-aware 的 $order->get_total(),傳統儲存與 HPOS 雙模式皆正確

📦 安裝

下載 woomp.zip,於 WordPress 後台「外掛 → 新增 → 上傳外掛」安裝。
已安裝舊版者透過 Plugin Update Checker 自動更新。