Documentation

Add_filter | Pi | Change Wallet Payment loctaion’s

We’ve put this guide together as a little helping hand for developers and designers. You’ll need a basic understanding of PHP to make the most of it.

Just a quick heads-up, we can’t provide support for custom code or offer any bespoke tweaks. Think of the snippets below as examples to guide you in the right direction.

Overview

This filter allows you to customise where the Apple Pay and Google Pay wallet payment options appear on your site.

By default, wallet buttons can be displayed:

  • At the top of the checkout page
  • At the bottom of the checkout page
  • On the cart page

But what if you’d prefer them somewhere else. For example, under the cart totals or in a custom area of your theme? This filter gives you full control.

How to Use

To change the location(s), add the following snippet to your site:

php
123456789
add_filter( 'ag_opayo_express_checkout_locations', function( $locations ) {
    // Clear all default locations
    $locations = [];

    // Add a custom hook location
    $locations['woocommerce_after_cart'] = 10;

    return $locations;
} );

In the example above, we:

  • Remove all existing placement hooks
  • Add the wallet buttons to display after the cart table using WooCommerce’s built-in woocommerce_after_cart hook

This filter is ideal if you’re using a custom layout or want full control over where wallet options appear.

If you’re a developer or using a bespoke theme, this gives you the flexibility to position wallet buttons exactly where you want them.

Was this helpful?

Opayo

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
All systems operational

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