• Resolved garcarloscia

    (@garcarloscia)


    Hi,
    I would like to change the button text of the woocommerce gutenberg block
    Where it says “a?adir al carrito” (add to cart) i need “Pagar y Descargar” (Pay and Download)
    Any clue of how can it be done
    Thanks

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Fernando a11n

    (@fhaps)

    Automattic Happiness Engineer

    The Add to Cart button used by the blocks is pulled from the core WooCommerce plugin. So, changing the text in the standard WooCommerce buttons would also change it on the product blocks.

    To change that label, I’d recommend using a translation plugin like Loco Translate.

    These type of plugins are generally used to change text from one language to another, but they can also be used to edit text within the same language. I know it may sound strange to “translate” your own language, but it works.

    Here’s what you’ll need to do once you’ve installed and activated the plugin:

    1. From the admin sidebar, click on “Loco translate” option and click on “Plugins”.
    2. Select the WooCommerce plugin from the list.
    3. I’m assuming you are using a Spanish translation, so select that translation on the list.
    4. Find the strings that you want to change with the filter box.
    5. Add your replacement texts.
    6. Click on Save, and then on Sync.
    7. Reload your site.

    Here’s a video about that plugin that outlines how it is used: https://www.youtube.com/watch?v=ZUPhsoUm-QE

    Thread Starter garcarloscia

    (@garcarloscia)

    Thanks, Fernando
    I am using a few other customisations for woocommerce using code snipets
    One of them affects the buttons in the product pages:
    //Add New Pay Button Text
    add_filter( ‘woocommerce_product_single_add_to_cart_text’, ‘themeprefix_cart_button_text’ );
    function themeprefix_cart_button_text() {
    return __( ‘Pagar y Descargar’, ‘woocommerce’ );}

    I was wondering if there is also something similar for the buttons of the block plugin
    Cheers

    Plugin Support Fernando a11n

    (@fhaps)

    Automattic Happiness Engineer

    You might indeed be able to change that text with a code snippet, but I’m afraid that is not my area of expertise.

    I’ll leave this thread open for now, in case other users from the community might chime in with additional suggestions.

    Thread Starter garcarloscia

    (@garcarloscia)

    Thanks for your time and attention, Fernando.
    I will wait and see if someone knows how to proceed with code snipets

    The state of the issue so far remanins:

    I would like to change the button text of the woocommerce gutenberg block
    Where it says “a?adir al carrito” (add to cart) i need “Pagar y Descargar” (Pay and Download)

    I am using a few other customisations for woocommerce using code snipets
    One of them affects the buttons in the product pages:
    //Add New Pay Button Text
    add_filter( ‘woocommerce_product_single_add_to_cart_text’, ‘themeprefix_cart_button_text’ );
    function themeprefix_cart_button_text() {
    return __( ‘Pagar y Descargar’, ‘woocommerce’ );}

    I was wondering if there is also something similar for the buttons of the block plugin

    Cheers

    Hi there,

    I’m following up on this open post. It looks like Fernando suggested to use a translation tool to change the text. Loco Translate should work for this purpose.

    However, you have asked to see if anyone can offer a code snippet solution instead. It’s been over a month, so you may need to reach out to a developer for an alternate solution in this case.

    I’ll mark this thread as resolved now. If you have any further questions, I recommend creating a new thread.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Change button text of woocommerce guttenberg block’ is closed to new replies.