Skip to content

Commit

Permalink
fix code smell
Browse files Browse the repository at this point in the history
  • Loading branch information
ajzkk committed Sep 3, 2023
1 parent f7d9b6a commit 66b9a86
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions includes/class-omise-capabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ class Omise_Capabilities {
public static function retrieve($pKey = null, $sKey = null)
{
$shouldCallApi = self::shouldCallApi(
is_checkout(),
is_checkout(),
// If endpoint url is `order-received`, it mean thank you page.
is_wc_endpoint_url( 'order-received' ),
is_admin(),
);

if( !$shouldCallApi ) return null;
if ( !$shouldCallApi ) {
return null;
}

$keys = self::getKeys($pKey, $sKey);

Expand Down

0 comments on commit 66b9a86

Please sign in to comment.