From 09cb0cd72e51f5851811946b781bf3042b52369d Mon Sep 17 00:00:00 2001 From: Zin Kyaw Kyaw <108650842+ajzkk@users.noreply.github.com> Date: Mon, 4 Sep 2023 09:29:11 +0700 Subject: [PATCH] update comment --- 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 405f432a..9c4e316d 100644 --- a/includes/class-omise-capabilities.php +++ b/includes/class-omise-capabilities.php @@ -83,13 +83,13 @@ public static function shouldCallApi() { $currentAdminPage = isset( $_GET[ 'page' ] ) ? $_GET[ 'page' ] : ''; - // checkout page but not thank you page + // If page is checkout page but not thank you page. // By default thank you page is also part of checkout pages // and we do not need to call capabilities on thank you page. // If endpoint url is `order-received`, it mean thank you page. $isPaymentPage = is_checkout() && !is_wc_endpoint_url( 'order-received' ); - // if from admin panel and is omise page. + // If page is omise setting page from admin panel. $isOmiseSettingPage = is_admin() && in_array( $currentAdminPage, $omiseSettingPages ); return $isPaymentPage || $isOmiseSettingPage;