Filter for only allowing ePDQ payment method for adminstrators

You may find the need not to want the ePDQ payment method to appear from your customers if your site is already live and still testing live transactions.

Step 1

You’ll have to copy the code (WooCommerce filter) below:

add_filter( ‘woocommerce_available_payment_gateways’, ‘ePDQ_enable_manager’ );
function ePDQ_enable_manager( $available_gateways ) {
if ( isset( $available_gateways[‘ag_epdq_checkout’] ) && ! current_user_can( ‘manage_woocommerce’ ) ) {
unset( $available_gateways[‘ag_epdq_checkout’] );
return $available_gateways;


Step 2 

You’ll have to install a code snippet plugin like Code Snippets plugin. and paste the code using it.
Note: We recommend using this plugin as an error on the code you’ve pasted; it won’t cause the site to crash.
The ePDQ payment method should now only be available for administrator users, and your customers shouldn’t see it from their end.

Was this helpful?

Barclaycard ePDQ Direct Link

Don't already have the plugin? Get access now.

Still need help?

Our team are on hand to provide fast, helpful and professional support.

Support request

Back End Demo

Start exploring our fully functional demo site today.
Gain exclusive admin access to see what's possible.

Create your demo now

Front End Demo

Test drive our plugin on the demo site.

View Demo

AG Bot (BETA) - Not live chat

Ask our bot about our products.

Welcome to our AG Bot, powered by OpenAI and trained on our documents and product pages. By continuing to use this service, please keep in mind:

Your continued use indicates acceptance of these terms. We hope you find our AI Chatbot useful!

Hello! I am AG Bot, how can I help you? (Not live chat)