I am trying to hide some specific payment method from frontend only. I have tried with observer and plugin. Both working fine if my di.xml and events.xml placed in global config i.e



Problem is, if I move them to frontend they stop working.



Thanks in advance

1 Answer 1


I have written blog about How to Disable Payment Method in frontend only.. Please check this.. I am sure this will be very useful to you.

This module is having functionality to disable payment module from admin configuration of payment method. You just need to 'Disable in Frontend' => 'Yes' and payment method will be disable from frontend.

Check: http://kachagopal.blogspot.com/2018/08/hide-payment-method-from-front-end-in.html

  • Thank you @Gopal, for sharing tutorial. my question is why observer is not working only for front. as I can see you also put your events.xml in global and check area in observer class.
    – Pawan
    Aug 14, 2018 at 2:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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