Documentation

add_action | Replace Default Apple Pay & Google Pay Button Location

Note

We’ve created a developer guide that shows how to change the position of the Apple Pay and Google Pay wallet buttons on the WooCommerce checkout page using a custom add_action.

Please note: This guide is intended for developers or designers with some working knowledge of PHP and WooCommerce hooks.

While we don’t provide customisation services as part of our support, we’ve included sample code to help you implement this change on your own site.

This snippet allows you to move the Apple Pay and Google Pay buttons from their default location (woocommerce_review_order_after_submit) to above the checkout form (woocommerce_before_checkout_form).

You can place this code in your theme’s functions.php file or within a custom plugin.

Important:
This will remove the default wallet buttons that appear after the “Place Order” button and instead display them above the checkout form. This can be useful for improving visibility and streamlining the customer experience.

Notes

  • Make sure ag_tyl_checkout_path is defined and points to your plugin assets correctly.

  • Use esc_attr() and esc_url() for security when echoing HTML attributes and URLs.

  • You can also remove the default action hook where the wallet buttons were previously shown.

Was this helpful?

Tyl by NatWest

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