Skip to content

Commit

Permalink
Update index.php
Browse files Browse the repository at this point in the history
set  CAPTURED green color
  • Loading branch information
alnazer authored Dec 16, 2024
1 parent b2c5dba commit 7d7218b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ private function format_email($order, $knet_detials, $template = "knet-details.h
"{tran_id}" => ($knet_detials->tran_id) ? $knet_detials->tran_id : "---",
"{ref_id}" => ($knet_detials->ref_id) ? $knet_detials->ref_id : "---",
"{created_at}" => ($knet_detials->created_at) ? wp_date("F j, Y H:i:s A", strtotime($knet_detials->created_at)) : "---",
"{result}" => sprintf("<b><span style=\"color:%s\">%s</span></b>", $this->get_status_color($order->get_status()), $knet_detials->result),
"{result}" => sprintf("<b><span style=\"color:%s\">%s</span></b>", $this->get_status_color($knet_detials->result), $knet_detials->result),
];
$replace_lang = [
"_lang(result)" => __("Result", "wc-knet"),
Expand All @@ -842,7 +842,7 @@ private function format_email($order, $knet_detials, $template = "knet-details.h
"_lang(amount)" => __("Amount", "wc-knet"),
"_lang(ref_id)" => __("Refrance id", "wc-knet"),
"_lang(created_at)" => __('Created at', "wc-knet"),
"{result}" => sprintf("<b><span style=\"color:%s\">%s</span></b>", $this->get_status_color($order->get_status()), $knet_detials->result),
"{result}" => sprintf("<b><span style=\"color:%s\">%s</span></b>", $this->get_status_color($knet_detials->result), $knet_detials->result),
];
$replace = array_merge($replace, $replace_lang);

Expand Down Expand Up @@ -933,6 +933,8 @@ private function get_status_color($status)
return "#04c1fb";
case "completed":
return "green";
case "CAPTURED":
return "green";
default:
return "#fb0404";
}
Expand Down

0 comments on commit 7d7218b

Please sign in to comment.