• Our gouverment have a new rule for people that have a webshop.
    When a customer want to buy a product and is on the checkout page the button must have the text ”Pay’, ‘Buy’ or ‘Checkout’
    But in WordPress/Woocommerce I can not find a option to change the text on the checkout page.
    Anyone know where to do that?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi @0108daniel ,

    Open the theme’s functions.php file and add the following code:

    add_filter( 'woocommerce_order_button_text', 'custom_order_button_text' );
    function custom_order_button_text() {
    return 'Checkout';
    }

    Here is the solution for without edit functions.php file:

    Using a Code Snippet Plugin:

    • Install and activate a code snippet plugin like “Code Snippets.”
    • Go to Snippets > Add New.
    • Enter a title for your snippet, and in the code box, paste the following code:
    add_filter( 'woocommerce_order_button_text', 'custom_order_button_text' );
    function custom_order_button_text() {
    return 'Checkout';
    }
    Thread Starter 0108daniel

    (@0108daniel)

    I don’t have the option ‘functions.php’ visable.
    I add it in appereances and then ‘extra css’ but that doesn’t work.

    The Snippets plugin doesn’t work for me.
    In the past I tried that but then my site had a total fatal error and had to call our website builder and site maintance to remove the plugin in the background because I was unable to login.

    @0108daniel ,

    you can find the functions.php file in your WordPress installation by following these steps:

    Method 1. Using the WordPress Dashboard

    1. Log in to your WordPress Admin.
    2. Navigate to Appearance > Theme Editor.
    3. On the right side, you’ll see a list of files. Look for Theme Functions or functions.php in the list.
    4. Click on it to open and edit the file.

    Method 2. Using FTP or File Manager

    If you prefer using FTP or a file manager:

    1. Connect to your server using an FTP client (like FileZilla) or your web host’s file manager.
    2. Navigate to the directory where WordPress is installed, usually something like /public_html/ or /www/.
    3. Go to /wp-content/themes/.
    4. Open the folder for your active theme. The path should look like this: /wp-content/themes/your-active-theme/.
    5. You should see the functions.php file there. Download it to edit, or edit it directly if your file manager supports it.

    Important Note

    • Backup First: Always make a backup of your functions.php file before making changes to avoid breaking your site.

    Prefer to Edit the functions.php file using Method 2.

    A less complex method would be to use Loco Translate: https://www.ads-software.com/plugins/loco-translate/

    With this plugin you can customize the texts from the language file of each plugin. This also applies to this button labeling.

    Thread Starter 0108daniel

    (@0108daniel)

    Thank you very much!
    Method 1 was working perfectly.

    That’s Great! @0108daniel

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