• Resolved opicron

    (@opicron)


    When using the following hook:

    // Enable "Place order" button for PayPal gateway
    add_filter('woocommerce_paypal_payments_use_place_order_button', '__return_true');

    Paypal is opened in the same window.

    When using the regular button Paypal is opened in a new small window. This is the preffered method.

    Is it possible to open Paypal in a new window when using above hook?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter opicron

    (@opicron)

    Also, by using this method the Proceed to Paypal automatically pays the order on the last account used. Instead it should go to the login page of Paypal.

    Another issue is that an Pending Payment order is created when using the custom hook. It would be much better to open in a new window and avoid all those Pending Payment orders.

    Plugin Support Krystian from Syde

    (@inpsydekrystian)

    Hello @opicron

    To answer your question directly – no, it is not possible to open PayPal in a new window when using the hook you mentioned. This hook has a different intended functionality.

    Typically, the PayPal button is displayed using an iframe from the PayPal SDK. When you apply this filter, it removes the JavaScript embedded in the button and reverts to the default “Place order” button, which redirects the buyer directly to the PayPal website.

    This option is useful in cases where there might be conflicts, or when additional plugin features like Vaulting are not being used, as they will not function with this setup. I wouldn’t recommend using this filter unless you have a specific use case in mind.

    Kind Regards,

    Krystian

    Thread Starter opicron

    (@opicron)

    Very clear, I have reverted back to using without the hook! Thanks.

    One thing though, I see that another plugin officially using Paypal platform can change the height of the Paypal button.

    https://wordpress.org/plugins/pymntpl-paypal-woocommerce/

    That functionality would be a nice improvement to match styling of many websites. Any chance this could be incorporated?

    Plugin Support Krystian from Syde

    (@inpsydekrystian)

    Hello @opicron

    Historically a height setting was not provided to not clutter the settings because back in the day all configurations were always visible.

    While there is no dedicated setting for the height on the single product, Classic Cart, or Classic Checkout pages, PayPal Payments provides the highest degree of customizability while adhering to core WooCommerce best practices. We are also working with the core blocks team to automatically ensure uniform button alignment with other plugins on the block pages: https://github.com/woocommerce/woocommerce/pull/47899

    A feature request for the button height and more granular shape settings is in the backlog, but currently there is little demand and it would significantly clutter the settings pages with settings which are not relevant to most users, so not currently on the roadmap.

    We’d like to know more about what exactly makes the height setting relevant to you. do you want the button to match the height of his “Proceed to Checkout” button, or are there third-party plugin buttons with different heights? A small level of control over the height can be exerted by tweaking the container width via CSS, but that doesn’t help if you want a fixed width with a smaller height.

    Looking forward to your response.

    Kind regards,
    Krystian

    Thread Starter opicron

    (@opicron)

    Thanks for the swift response. The fine granular control would be only to make the button the same height as the regular pay button.

    It has no priority of course, it looks good now– I just think it would look 1% better with same heights :).

    View post on imgur.com

    View post on imgur.com

    • This reply was modified 1 month, 3 weeks ago by opicron.
    Plugin Support Krystian from Syde

    (@inpsydekrystian)

    Hello @opicron

    I’ll mark this thread as resolved for now. If there are any updates on the issue you mentioned, I will update you accordingly.

    If you still have any questions or if a new problem arises, don’t hesitate to open a new thread.

    Kind regards,
    Krystian

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.