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.
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?
Our team are on hand to provide fast, helpful and professional support.
Start exploring our fully functional demo site today.
Gain exclusive admin access to see what's possible.