Skip to content

Instantly share code, notes, and snippets.

@InpsydeNiklas
Last active November 25, 2023 14:24
Show Gist options
  • Save InpsydeNiklas/202837609318f9c0e827c382787147b0 to your computer and use it in GitHub Desktop.
Save InpsydeNiklas/202837609318f9c0e827c382787147b0 to your computer and use it in GitHub Desktop.
move PayPal button on product page below add to cart form
add_filter('woocommerce_paypal_payments_single_product_renderer_hook', function() {
return 'woocommerce_after_add_to_cart_form';
});
@InpsydeNiklas
Copy link
Author

In version 2.1.0 and newer, this filter was implemented in the core plugin and activates automatically either when Divi is the active (parent) theme or the Elementor Pro plugin is active: woocommerce/woocommerce-paypal-payments#1254

So there may be a small number of users that suddenly notice a slight change in the button placement on the single product page if they have the Elementor Pro plugin active, but don't actually use it to build a custom single product page.

There may still be other page builders or custom themes which would still benefit from manually adding the filter. But the majority of reports about incorrect button placement on single product should ideally be resolved by this.

@Triloworld
Copy link

Triloworld commented Aug 14, 2023

@InpsydeNiklas

But the majority of reports about incorrect button placement on single product should ideally be resolved by this.

Majority is #1 Gutenberg + FSE and it isn't show properly ;/ Add option to enable this in panel as placement adjust so anybody can easily use that change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment