src/Hyyan/WPI/Emails.php
/**
     * Register woocommerce email subjects and headings in polylang strings
     * translations table.
     */
Register woocommerce email subjects and headings in polylang strings
translations table.
Register woocommerce email subjects and headings in polylang strings translations table .
public function registerEmailStringsForTranslation()
    {
        $this->emails = apply_filters(HooksInterface::EMAILS_TRANSLATABLE_FILTER, array(
            'new_order',
            'customer_processing_order',
            'customer_refunded_order',
            'customer_note',
            'customer_invoice',
            'customer_completed_order',
            'customer_new_account',
            'customer_reset_password',
            'customer_on_hold_order',
            'cancelled_order',
            'failed_order',
        ), $this);
        foreach ($this->emails as $email) {
            switch ($email) {
                case 'customer_refunded_order':
                    $this->registerString($email, '_partial');
                    $this->registerString($email, '_full');
                    break;
                case 'customer_invoice':
                    $this->registerString($email, '_paid');
                    $this->registerString($email);
                    break;
                case 'customer_completed_order':
                    $this->registerString($email, '_downloadable');
                    $this->registerString($email);
                    break;
                case 'new_order':
                case 'cancelled_order':
                case 'failed_order':
                case 'customer_processing_order':
                case 'customer_note':
                case 'customer_new_account':
                case 'customer_reset_password':
                case 'customer_on_hold_order':
                default:
                    $this->registerString($email);
                    break;
            }
        }
        $this->registerCommonString('woocommerce_email_footer_text', sprintf(__('%s - Powered by WooCommerce', 'woocommerce'), get_bloginfo('name', 'display'))
        );
        $this->registerCommonString('woocommerce_email_from_name', esc_attr(get_bloginfo('name', 'display')));
        $this->registerCommonString('woocommerce_email_from_address', get_option('admin_email'));
    }
public function registerEmailStringsForTranslation ( ) { $ this -> emails = apply_filters ( HooksInterface :: EMAILS_TRANSLATABLE_FILTER , array ( 'new_order' , 'customer_processing_order' , 'customer_refunded_order' , 'customer_note' , 'customer_invoice' , 'customer_completed_order' , 'customer_new_account' , 'customer_reset_password' , 'customer_on_hold_order' , 'cancelled_order' , 'failed_order' , ) , $ this ) ; foreach ( $ this -> emails as $ email ) { switch ( $ email ) { case 'customer_refunded_order' : $ this -> registerString ( $ email , '_partial' ) ; $ this -> registerString ( $ email , '_full' ) ; break ; case 'customer_invoice' : $ this -> registerString ( $ email , '_paid' ) ; $ this -> registerString ( $ email ) ; break ; case 'customer_completed_order' : $ this -> registerString ( $ email , '_downloadable' ) ; $ this -> registerString ( $ email ) ; break ; case 'new_order' : case 'cancelled_order' : case 'failed_order' : case 'customer_processing_order' : case 'customer_note' : case 'customer_new_account' : case 'customer_reset_password' : case 'customer_on_hold_order' : default : $ this -> registerString ( $ email ) ; break ; } } $ this -> registerCommonString ( 'woocommerce_email_footer_text' , sprintf ( __ ( '%s - Powered by WooCommerce' , 'woocommerce' ) , get_bloginfo ( 'name' , 'display' ) ) ) ; $ this -> registerCommonString ( 'woocommerce_email_from_name' , esc_attr ( get_bloginfo ( 'name' , 'display' ) ) ) ; $ this -> registerCommonString ( 'woocommerce_email_from_address' , get_option ( 'admin_email' ) ) ; }
Register woocommerce email subjects and headings in polylang strings
 translations table.
Register woocommerce email subjects and headings in polylang strings translations table .
// Register strings for translation and hook filters // Register strings // Register strings // Register strings //Register global email strings for translation