src/Hyyan/WPI/Emails.php
/**
     * Register email subjects and headings strings for translation in Polylang
     * Strings Translations table.
     *
     * Note: This function uses get_option to retrive the subject and heading
     * string from the WooCommerce Admin Settings page. get_option will return false
     * if the Admin user has not changed (nor saved) the default settings.
     *
     * @param string $email_type Email type
     * @param string $sufix      Additional string variation, e.g. invoice paid vs invoice
     */
Register email subjects and headings strings for translation in Polylang
Strings Translations table.

This function uses get_option to retrive the subject and heading
string from the WooCommerce Admin Settings page. get_option will return false
if the Admin user has not changed (nor saved) the default settings.

@param string $email_type Email type
@param string $sufix      Additional string variation, e.g. invoice paid vs invoice
Register email subjects and headings strings for translation in Polylang Strings Translations table . This function uses get_option to retrive the subject and heading string from the WooCommerce Admin Settings page . get_option will return false if the Admin user has not changed ( nor saved ) the default settings . @param string $email_type Email type @param string $sufix Additional string variation e . g . invoice paid vs invoice
public function registerString($email_type, $sufix = '')
    {
        if (function_exists('pll_register_string')) {
            $settings = get_option('woocommerce_' . $email_type . '_settings');
            if ($settings) {
                if (isset($settings['subject' . $sufix]) && isset($settings['heading' . $sufix])) {
                    pll_register_string('woocommerce_' . $email_type . '_subject' . $sufix, $settings['subject' . $sufix], __('WooCommerce Emails', 'woo-poly-integration'));
                    pll_register_string('woocommerce_' . $email_type . '_heading' . $sufix, $settings['heading' . $sufix], __('WooCommerce Emails', 'woo-poly-integration'));
                }
                if (isset($settings['recipient' . $sufix])) {
                    pll_register_string('woocommerce_' . $email_type . '_recipient' . $sufix, $settings['recipient' . $sufix], __('WooCommerce Emails', 'woo-poly-integration'));
                }
            }
        }
    }
public function registerString ( $ email_type , $ sufix = '' ) { if ( function_exists ( 'pll_register_string' ) ) { $ settings = get_option ( 'woocommerce_' . $ email_type . '_settings' ) ; if ( $ settings ) { if ( isset ( $ settings [ 'subject' . $ sufix ] ) && isset ( $ settings [ 'heading' . $ sufix ] ) ) { pll_register_string ( 'woocommerce_' . $ email_type . '_subject' . $ sufix , $ settings [ 'subject' . $ sufix ] , __ ( 'WooCommerce Emails' , 'woo-poly-integration' ) ) ; pll_register_string ( 'woocommerce_' . $ email_type . '_heading' . $ sufix , $ settings [ 'heading' . $ sufix ] , __ ( 'WooCommerce Emails' , 'woo-poly-integration' ) ) ; } if ( isset ( $ settings [ 'recipient' . $ sufix ] ) ) { pll_register_string ( 'woocommerce_' . $ email_type . '_recipient' . $ sufix , $ settings [ 'recipient' . $ sufix ] , __ ( 'WooCommerce Emails' , 'woo-poly-integration' ) ) ; } } } }
Register email subjects and headings strings for translation in Polylang
 Strings Translations table.
Register email subjects and headings strings for translation in Polylang Strings Translations table .
//recipient applies to shop emails New, Cancel and Failed order types