• Resolved Jordi

    (@jordi1)


    This is an issue I found in Mailpoet when I use subscription to Mailpoet from the WC checkout page: the string ‘Yes, I would like to be added to your mailing list´is not ready for translation.

    The following workaround solves it.
    At plugins/mailpoet/lib/WooCommerce/subscription.php file, replace line 63
    by:
    <span class=”woocommerce-terms-and-conditions-checkbox-text”> ‘.esc_html__(‘Yes, I would like to be added to your mailing list’,’woocommerce’).’ </label>

    This works fine. The point is if Mailpoet development group could modify their code to make that available to everybody in next update.

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,

    Thanks for writing. Sorry about the problems with translation. You can try using a 3rd party plugin like: https://wordpress.org/plugins/loco-translate/

    ​Thanks,

    Hi @wysija
    I do not think you can use locotranslate plugin or other because the string is not ready for translation.
    There is even no any specific class that could allow to hide the stuff on a language we do not want to service…
    It would be nice if you upgrade the code – @jordi1 has got the point.

    The current code is:

    private function getSubscriptionField($inputName, $checked, $labelString) {
        return '<p class="form-row">
          <label class="woocommerce-form__label woocommerce-form__label-for-checkbox checkbox" data-automation-id="woo-commerce-subscription-opt-in">
          <input type="checkbox" class="woocommerce-form__input woocommerce-form__input-checkbox input-checkbox" name="' . $this->wp->escAttr($inputName) . '" id="' . $this->wp->escAttr($inputName) . '" ' . ($checked ? 'checked' : '') . ' />
            <span class="woocommerce-terms-and-conditions-checkbox-text">' . $this->wp->escHtml($labelString) . '</label>
        </p>';
      }
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Mailpoet: Make translatable an string in checkout page’ is closed to new replies.