This is probably something simple, but I'm having a hard time configuring the permissions that would only allow the administrators to see the example payment method of the Drupal Commerce module. I have example payment method activated for testing purposes but every time I activate it, the example payment methods appears public. How can I configure the permission so that only the administrators can see the example payment method. I appreciate any help.


You have to go admin/commerce/config/payment-methods And edit the example payment. In there you can set a condition that is on user. Data type of current user is admin and that will only allow admins to process the test payments.


@topCweb shows the way. In terms of details, here is an export of the condition that I ended up using. The "User has role(s)" condition seemed the easiest. The exact role number may vary for each site.

 "IF" : [
      { "user_has_role" : {
          "account" : [ "site:current-user" ],
          "roles" : { "value" : { "3" : "3" } },
          "operation" : "OR"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.