• I have set up a shop and managed to use the plugin without a problem. However, I would like to change the text on the Cart page.

    I would like to change ‘shipping and handling’ to say ‘Delivery’.
    After ‘Order Total’ I would like to add ‘(excluding delivery)’.

    I’ve started looking for the words in the Editor but cannot seem to find them. Does anyone know where they are so I can change them?

    https://www.ads-software.com/plugins/woocommerce/

Viewing 10 replies - 1 through 10 (of 10 total)
  • You could use the translate feature.

    Look in wp-config.php for the line:
    define(‘WPLANG’, ‘x’);
    Is there something at x? If not, put your language code in there. If your site is in English, you would use
    define(‘WPLANG’, ‘en_GB’);

    Next, find the relevant translation file, for English it would be:
    wp-content/plugins/woocommerce/i18n/languages/woocommerce-en_GB.po
    The subject messages are translated at lines 5277 and 7556. In English, the translation is the same, but they dodn’t have to be. Change the msgstr value for your custom text.

    Compile the .po to a .mo file using poedit, and upload both to where you got the .po from. Keep backups just in case.

    Read the penultimate para here about making your customised translation upgrade safe, and for information about using a plugin to do the above if you prefer.

    Thread Starter Fitshase

    (@fitshase)

    Hi,

    I’ve searched the file you mention but cannot find the relevant entries for the text I need to change.

    I’ve managed to update the “Shipping and Handling” to “Delivery” by editing the
    “cart-shipping.php” file in
    “wp-content/plugins/woocommerce/templates/cart/”

    However, I’ve tried changing relevant values in the other php files but it makes no difference.

    I should avoid editing the php files because any edits will be overwritten on WooCommerce updates, so you’ll need to re-edit every few weeks.

    I have checked and “Order total” is at line 7592 not 5277, sorry, but “Shipping and Handling” is at line 7556. Maybe you are using a different WC version, I have 2.1.12. Also ensure you are not looking at the similarly named woocommerce-admin-en_GB.po.

    If this method doesn’t work for you, consider trying the localization plugin.

    I’m unsure if this will help at all, but with the Bundle Rate Shipping plugin available at code canyon, it will allow you to change the text easily from the wordpress settings > shipping tab.

    Thread Starter Fitshase

    (@fitshase)

    @lorro

    Sorry – my bad – I was looking at the woocommerce-admin-en_GB.po file. However, I’ve edited the correct po file, using Poedit and saved the file which generated the mo file. I’ve copied both to the web server. I’ve also defined the language in the WP-Config file but it doesn’t do anything.

    Woocommerce version is 2.1.12.

    Um, first time I did this I mixed up the filename’s hyphens and underscores, or maybe you running a cache plugin and you are looking at a cached page. Consider trying the localization plugin.

    Thread Starter Fitshase

    (@fitshase)

    I double and triple checked everything. I even installed the localization plugin and it showed the changes I’d made to the po and mo files in the plugin but they weren’t reflected on the site.

    Strange!

    Maybe you need to update WordPress to the en_GB version. Normally this would be Dashboard > Updates, but of course 4 has just come out. Are you using 4? If not, consider updating to WordPress 3.9.2–en_GB manually.

    Thread Starter Fitshase

    (@fitshase)

    I am using 4 and there is no update showing.

    Suppose I’d best just wait it out until they release an en_GB version.

    The en_GB version is on this page, click “Zip”.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Change Text in Plugin’ is closed to new replies.