• Resolved simppa999

    (@simppa999)


    How to pint documents (invoice/receipt) same language as customers language and not as admins language.? This is essential when you have multilanguage WooCommerce.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author priyankajagtap

    (@priyankajagtap)

    Hi @simppa999,

    Currently, our plugin does not support compatibility with WPML, which means that it cannot print invoices or receipts in the customer’s selected language at the time of placing an order.

    However, if you’re looking to translate strings within our plugin, I recommend using any translation plugin like Loco Translate. This tool allows you to easily translate the plugin’s strings into your desired languages, ensuring that the content is accessible to your customers.

    If you have any more questions or need further assistance, please don’t hesitate to reach out!

    Thread Starter simppa999

    (@simppa999)

    Hello, actually I managed to resolve the issue easily using WPML functions on invoice templates.

    Get order language that is saved by WPML:
    get_post_meta($order->get_id(), ‘wpml_language’, true);

    Set that language afterwards:
    do_action( ‘wpml_switch_language’, $lang );

    In the end revert that setting to the current language.

    Plugin Author priyankajagtap

    (@priyankajagtap)

    Hi @simppa999,

    Thank you for your quick follow-up and for sharing the solution you found! It’s great to hear that you were able to resolve the issue using WPML functions on the invoice templates.

    Your approach of retrieving the order language and switching the language context is a smart workaround. We appreciate you providing this insight, as it may be helpful for other users facing similar challenges.

    If you have any further questions or if there’s anything else we can assist you with, please feel free to reach out. We’re here to help!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Print based customers language’ is closed to new replies.