• Resolved Janusz

    (@janekher)


    Hi, I have a problem with the position of the button.
    In the product options I have set “Below Add to cart” but the button is still above and I cannot change this

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Krystian from Syde

    (@inpsydekrystian)

    Hello @janekher

    You can adjust the placement of your PayPal buttons. This can be achieved by using the render hooks as described in the plugin’s documentation: https://github.com/woocommerce/woocommerce-paypal-payments/wiki/Actions-and-Filters#change-button-placement-via-render-hooks

    Here’s the code snippet you’ll need to add to your theme’s functions file or by using the?Code snippets?plugin:

    add_filter('woocommerce_paypal_payments_single_product_renderer_hook', function() {
    return 'woocommerce_after_add_to_cart_button';
    });

    If you need further assistance or have any more questions, please don’t hesitate to get in touch.

    Kind Regards,

    Krystian

    Thread Starter Janusz

    (@janekher)

    I have already tried this solution and unfortunately it does not work

    Plugin Support Krystian from Syde

    (@inpsydekrystian)

    Hello @janekher

    It appears that you might not be using our PayPal Payments plugin. I should have verified this information initially, and I’m sorry for any oversight.

    I would recommend upgrading to our plugin. This is likely the solution to address the issue you’re facing.

    Kind Regards,

    Krystian

    Thread Starter Janusz

    (@janekher)

    Ok, I installed your plugin, added the function in functions.php and nothing changed. The Paypal button is still above add to card.

    I also checked to add the function via code snippet

    Plugin Support Krystian from Syde

    (@inpsydekrystian)

    Hello @janekher

    We recommend testing with another theme, such as Storefront, to see if the issue persists. Some themes may not support the default or replacement hooks which can lead to the button not being displayed in the desired location.

    You can also try utilizing different hooks to change the position of the PayPal button. Here are some hooks that you might find useful:

    • woocommerce_after_add_to_cart_form
    • woocommerce_product_meta_start
    • woocommerce_product_meta_end
    • woocommerce_share

    You can add one hook at a time to your functions.php file or via the code snippet to see which one works best with your current theme.

    Kind regards,
    Krystian

    Plugin Support Syde Niklas

    (@niklasinpsyde)

    Since we haven’t heard back from you in a while, I’ll mark this thread as resolved.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Button position on product page’ is closed to new replies.