From e4b1e6ee59d6785ff669a29eacb8c8e688528624 Mon Sep 17 00:00:00 2001 From: Narumon Nakkarit Date: Wed, 15 Jan 2025 18:55:21 +0700 Subject: [PATCH] Update ajax actions --- includes/class-omise-capabilities.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/class-omise-capabilities.php b/includes/class-omise-capabilities.php index c0a73478..077d9309 100644 --- a/includes/class-omise-capabilities.php +++ b/includes/class-omise-capabilities.php @@ -97,8 +97,8 @@ public static function isFromCheckoutPage() if (!$wp) { return false; } - - if (wp_doing_ajax() && $_GET['wc-ajax'] == 'update_order_review') { + $ajaxActions = ['update_order_review', 'checkout']; + if (wp_doing_ajax() && in_array($_GET['wc-ajax'], $ajaxActions)) { return true; }