Skip to content

Commit

Permalink
fix: 變數命名 & 使用物件的方法取資料
Browse files Browse the repository at this point in the history
  • Loading branch information
j7-dev committed Nov 14, 2023
1 parent bf26723 commit c6f0c45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions includes/woomp-ecpay-invoice/src/apis/EcpayInvoiceHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ public function generate_invoice($order_id)
$ecpay_invoice->MerchantID = $this->get_api_key()['merchant_id'];
$ecpay_invoice->HashKey = $this->get_api_key()['hashkey'];
$ecpay_invoice->HashIV = $this->get_api_key()['hashiv'];
$ecpay_invoice->Send = [];
$ecpay_invoice->Send['Items'] = [];

// 取得商品資訊
$items = array();
$items = [];
$itemsTmp = $order->get_items();


Expand Down Expand Up @@ -206,7 +206,6 @@ public function generate_invoice($order_id)

$return_info = $ecpay_invoice->Check_Out();


// 於備註區寫入發票資訊
$invoice_date = $return_info['InvoiceDate'];
$invoice_number = $return_info['InvoiceNumber'];
Expand All @@ -233,6 +232,8 @@ public function generate_invoice($order_id)
$order->save();
}



return $invoice_message;
// return __('Generate Ecpay invoice issue finish!', 'woomp');
} catch (Exception $e) {
Expand Down
2 changes: 1 addition & 1 deletion woomp.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Plugin Name: 好用版擴充 MorePower Addon for WooCommerce
* Plugin URI: https://morepower.club/morepower-addon/
* Description: WooCommerce 好用版擴充,改善結帳流程與可變商品等區塊,讓 WooCommerce 更符合亞洲人使用習慣。
* Version: 3.1.3
* Version: 3.1.4
* Author: MorePower
* Author URI: https://morepower.club
* License: GPL-2.0+
Expand Down

0 comments on commit c6f0c45

Please sign in to comment.