From 5d864d72ebbd5fc70703b9ffd64fe9959e7caf99 Mon Sep 17 00:00:00 2001 From: Jae Date: Fri, 13 Dec 2024 13:45:41 +0900 Subject: [PATCH] Add isAdmin check & fix if statement --- includes/class-wc-gateway-komoju-block.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-gateway-komoju-block.php b/includes/class-wc-gateway-komoju-block.php index 23c2b77..7e61541 100644 --- a/includes/class-wc-gateway-komoju-block.php +++ b/includes/class-wc-gateway-komoju-block.php @@ -45,7 +45,7 @@ public function get_payment_method_script_handles() public function get_payment_method_data() { - if (!is_null(WC()->cart) && WC()->cart->is_empty()) { + if (!is_admin() && (is_null(WC()->cart) || WC()->cart->is_empty())) { return; }