Skip to content

Commit

Permalink
[ENGA3-857]: In shopeepay, if capabilities is null then we return 'sh…
Browse files Browse the repository at this point in the history
…opeepay' source type as default instead of calling the 'getShopeeBackend' function. (#344)
  • Loading branch information
aashishgurung authored Jan 25, 2023
1 parent 35cf48c commit 031f96b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions includes/gateway/class-omise-payment-shopeepay.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ public function charge($order_id, $order)
private function getSource()
{
$capabilities = Omise_Capabilities::retrieve();

if (!$capabilities) {
return self::ID;
}

$isShopeepayJumpAppEnabled = $capabilities->getShopeeBackend(self::JUMPAPP_ID);
$isShopeepayEnabled = $capabilities->getShopeeBackend(self::ID);

Expand Down

0 comments on commit 031f96b

Please sign in to comment.