-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PLUGIN1CC-3709] Calling 1cc pref api only for admin user and in razorpay payment seet… #557
Conversation
if (!empty($merchantPreferences['features']['one_cc_store_account'])) { | ||
$isAccCreationAvailable = true; | ||
} | ||
set_transient( self::ONE_CC_MERCHANT_PREF, $merchantPreferences, 7200 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ChetanGN , don't see any check around this before API call ?
$merchantPreferences = get_transient(self::ONE_CC_MERCHANT_PREF); | ||
|
||
// Load preference API call only for administrative interface + razorpay payment settings page. | ||
if (current_user_can('administrator') && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ChetanGN , any analysis why too many API hits , though we have admin check here ?
@@ -277,6 +277,7 @@ public function __construct($hooks = true) | |||
|
|||
// Load preference API call only for administrative interface + razorpay payment settings page. | |||
if (current_user_can('administrator') && | |||
empty($merchantPreferences) === true && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ChetanGN , please use ()
for each condition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…ings page
Note :- Please follow the below points while attaching test cases document link below:
- If label
Tested
is added then test cases document URL is mandatory.- Link added should be a valid URL and accessible throughout the org.
- If the branch name contains hotfix / revert by default the BVT workflow check will pass.