omise / omise-woocommerce

Omise WooCommerce Plugin
https://docs.opn.ooo/woocommerce-plugin
MIT License
47 stars 27 forks source link

[ENGA3-420]: Updated Omise_Capabilities class to prevent calling capabilities API when the keys are null. #305

Closed aashishgurung closed 2 years ago

aashishgurung commented 2 years ago

1. Objective

Prevent calling capabilities API when the keys are null.

Jira Ticket: #420

2. Description of change

Updated Omise_Capabilities class to prevent calling capabilities API when the keys are null. Added a check that compares the newly fetched keys with the previously saved keys. If the keys are different then then we call to capabilities API else we return previously built instance.

🔧 Environments:

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication