Hello @leelnj
We received your report on Thursday, and I see that I responded the next day. I’ll copy the response here for you. Please also check your email, as it’s marked as “waiting for customer” at our service desk.
Here’s the response:
To move the Apple Pay button to the top of the page, you can indeed use the hook provided by our plugin. You will need to modify the render hook of the Apple Pay button to adjust its position. The render hook you are looking for is woocommerce_paypal_payments_applepay_checkout_button_render_hook
Based on the WooCommerce Hooks you have several options such as
woocommerce_before_checkout_form
woocommerce_checkout_before_customer_details
woocommerce_before_checkout_billing_form
and others available in this guide on available hooks. Depending on where you would like to place it, here is how you can use a filter to modify it:
add_filter('woocommerce_paypal_payments_applepay_checkout_button_render_hook', function() { return 'woocommerce_before_checkout_form'; });
In the example above, I used the first choice from the list. It’s a bit of trial and error to find the hook that suits your preferences. If you encounter any problems or need further assistance, don’t hesitate to reach out. Implementing filters is straightforward with the help of plugins like Code Snippets.
Kind Regards,
Krystian
Thread Starter
leelnj
(@leelnj)
Thanks so much Krstian. It works great.
-
This reply was modified 2 years ago by
leelnj.
Hello @leelnj,
Great to hear it’s working. I’ll mark this thread as resolved.
Kind regards,
Krystian