From 66b9a8627162308f48e57cc5f8555ef51f67500d Mon Sep 17 00:00:00 2001 From: Zin Kyaw Kyaw <108650842+ajzkk@users.noreply.github.com> Date: Sun, 3 Sep 2023 15:58:07 +0700 Subject: [PATCH] fix code smell --- includes/class-omise-capabilities.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/class-omise-capabilities.php b/includes/class-omise-capabilities.php index 7dbddbe7..9a8caf3d 100644 --- a/includes/class-omise-capabilities.php +++ b/includes/class-omise-capabilities.php @@ -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);