Support » Plugin: WooCommerce PayPal Checkout Payment Gateway » Change Smart Button Text

  • Resolved justlevine

    (@justlevine)


    How can I change the text on the Paypal Smart Button?

    E.g. from the default “Paypal” to “Pay with Paypal”.
    Or even better, “[Paypal Icon] Pay Now”.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Elvira K

    (@treibalen)

    Hi there @justlevine,

    > How can I change the text on the Paypal Smart Button?

    The button uses the PayPal logo, not a string (https://cld.wthms.co/0x4O9N), so changing it will require some custom code to be written.

    This is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    I can also recommend the following places for more development-oriented questions:

    1. WooCommerce Slack Community: https://woocommerce.com/community-slack/
    2. Advanced WooCommerce group on Facebook: https://www.facebook.com/groups/advanced.woocommerce/

    If you want to hire a developer to customize our plugin, then we highly recommend contacting one of the services on our Customizations page (https://woocommerce.com/customizations/)

    Cheers!

    Hi Elvira –

    Thanks for the response!

    On my install, when I choose ‘Horizontal’ as the button direction the button style options, a ‘Pay Now’ label is displayed.

    While label is one of the parameters in the PayPal documentation, I can neither find the option nor the filter to either enable the label in vertical mode, nor edit the label text. (And a cursory glance at the code and I can’t figure out where and whether WC is either grabbing the label text for horizontal from somewhere or removing it for vertical).

    I find it hard to believe this isn’t configured in the plugin somewhere. If you confirm that there is currently no way to define the label in the Settings, I’ll happily submit a PR.

    Thanks!

    Plugin Support Elvira K

    (@treibalen)

    Hi there @justlevine,

    Indeed, there is no setting to change the Buy Now label text:

    https://cld.wthms.co/MgPpkV
    Link to image: https://cld.wthms.co/MgPpkV

    Not even in the plugin’s code – https://github.com/woocommerce/woocommerce-gateway-paypal-express-checkout/search – so it’s pulling it from PayPal itself.

    I see that you posted a suggestion already – https://github.com/woocommerce/woocommerce-gateway-paypal-express-checkout/issues/572 – so I will mark this thread as resolved and we can keep the discussion there.

    Cheers!

    • This reply was modified 1 year, 1 month ago by Elvira K.
    • This reply was modified 1 year, 1 month ago by Elvira K.

    Thanks for clarifying, @treibalen !

    Technically, the issue I opened was a bug report regarding the inconsistent behavior you brought to light (that the label doesn’t display in vertical mode and/or does in horizontal, and that the label text is set from the button request and doesnt pass along ANY user-defined value aka the gateway name or a custom field).

    I’ve clarified there, but yeah, this can remain safely closed for now 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Change Smart Button Text’ is closed to new replies.