• Resolved petermorlion

    (@petermorlion)


    I recently updated to 2.8.0 of the plugin. Instead of a single checkbox in the user’s account page to subscribe to the newsletter, it is now a group of radiobuttons.

    However, I have a Dutch site and the unsubscribe link doesn’t seem to be translated. No worries, I thought. I’ll just update it via PocoTranslate. But the entry doesn’t seem to appear.

    I had a look at your code and don’t see anything wrong, but I’m no PHP/WordPress expert.

    It would be nice if I could translate the “Unsubscribe from our newsletter” and “Receive Order Updates” (would be even nicer if I could remove that last option).

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support khungate

    (@khungate)

    Hi @petermorlion! It sounds like you’re having trouble translating the unsubscribe link and modifying the radio button options in the Mailchimp for WooCommerce plugin. Here’s what you can do:

    1. Translate the “Unsubscribe from our newsletter” and “Receive Order Updates” texts: To translate these strings, you’ll need to find the corresponding .pot file for the plugin. This file is located in the ‘languages’ folder within the plugin directory. Once located, you can use a tool like Poedit or PocoTranslate. Once you have the .pot file, create a new .po file for the Dutch language (you can use Poedit for this as well). Make sure to name the file using the correct locale code (e.g., mailchimp-woocommerce-nl_NL.po). Open the .po file, find the strings you want to translate, and add your translations. Finally, save the file and generate the corresponding .mo file (e.g., mailchimp-woocommerce-nl_NL.mo).Upload the .po and .mo files to the ‘languages’ folder of the Mailchimp for WooCommerce plugin directory on your server. This should enable the translations on your site.
    2. Remove the “Receive Order Updates” option: You can remove this option by creating a custom function in your theme’s functions.php file or in a custom plugin. Add the following code:
    function customize_mailchimp_for_woocommerce_form( $form ) {
        if ( isset( $form['order_notifications'] ) ) {
            unset( $form['order_notifications'] );
        }
        return $form;
    }
    add_filter( 'mailchimp_woocommerce_mailchimp_form', 'customize_mailchimp_for_woocommerce_form' );
    

    This function checks if the ‘order_notifications’ field exists in the Mailchimp form and removes it if it does. The filter hook ‘mailchimp_woocommerce_mailchimp_form’ is used to modify the form before it’s displayed on the user’s account page.

    After making these changes, please clear your website’s cache (if applicable) and verify that the translations are correctly applied and the “Receive Order Updates” option is removed from the form.

    If you need further assistance or run into any issues, feel free to ask here or over at our GitHub plugin page where you can speak directly to our engineers. Good luck!

    Thread Starter petermorlion

    (@petermorlion)

    It is fixed in 2.8.1 now.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Translations for 2.8.0’ is closed to new replies.