fix: resolve all Week 1 critical bugs (F1.1–F1.9)

- Fix Customer::update() fatal error (undefined $table_name, $new_args)
- Fix Order::delete() using wrong variable $id instead of $order_id
- Fix Order::bulk_delete() using outer $order_id instead of loop $id
- Fix Email::send_email() calling non-existent class (use parent::)
- Add missing Order import in Paypal.php
- Fix BankTransfer unique_code triple DB call (call once, reuse result)
- Fix color field label showing "Number" instead of "Color"
- Add nonce verification to Customer::formipay_tabledata_customers()

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
dwindown
2026-04-17 19:40:12 +07:00
parent 4274be81a4
commit be9a1a0a86
7 changed files with 17 additions and 11 deletions

View File

@@ -128,15 +128,17 @@ class BankTransfer extends Payment {
$order_data['payment_gateway'] == 'bank_transfer'
){
$unique_code = $this->check_unique_code();
$details[] = [
'item' => __( 'Unique Code', 'formipay' ),
'amount' => $this->check_unique_code(),
'subtotal' => floatval($this->check_unique_code()),
'context' => floatval($this->check_unique_code()) < 0 ? 'sub' : 'add'
'amount' => $unique_code,
'subtotal' => floatval($unique_code),
'context' => floatval($unique_code) < 0 ? 'sub' : 'add'
];
}
return $details;
}