• Can anyone explain how can I translate shipping method title?

    “You can use the filter wps_settings_data with the key title to create a custom valid translation for the title.” Great to know, but is there any examples for average users how to implement this

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Keylor Mendoza

    (@keylorcr)

    Hey @fakimb

    Maybe this snippet might be helpful for you. This code will edit the shipping label and also the store dropdown title (Local Pickup)

    function kmchild_wps_shipping_title($title) {
    	return 'My custom label';
    }
    add_filter('wps_shipping_method_label', 'kmchild_wps_shipping_title');
    add_filter('wps_store_checkout_label', 'kmchild_wps_shipping_title');

    Let me know if it works for you

    Regards.

    Hi, your code is working on front-end. But when email is sent to customer, contain title in original language. How can I fix this?

    I noticed the same.
    For the time being I created a translation in my language and changed the title to fit to my needs inside it…

    @madmax4ever can you explain it little more, please? Thanks.

    On the setting page, for the “Shipping Method Title”, I set my own label, in French. But looking at the mail, I saw I did not get it.
    Thus I looked into the files and saw that if creating a french translation, I could get the label I wanted by translating the “Pickup Store” entry.
    You’ll be able to do so with a translation plugin (you’ll find them easily on this site).
    Hope it helps.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Title translation’ is closed to new replies.