v3.5.4
🐛 修正
LINE Pay HPOS 下 confirm 階段金額比對誤判,每筆訂單必失敗(#110 / #111)
- 根因:
includes/line-pay-for-woo/includes/class-wc-gateway-linepay.php在process_payment_confirm()用$order->get_meta( '_order_total' )取金額。_order_total是 WooCommerce 核心欄位,HPOS 啟用後存放於wc_orders.total_amount而非wp_postmeta,get_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 自動更新。