Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ajzkk committed Sep 4, 2023
1 parent d22d6b3 commit 09cb0cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/class-omise-capabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 09cb0cd

Please sign in to comment.