Adding the below code to my child theme functions.php file solved my issues. Not sure if will work for you.
/**
* Fix Shipping method not translated by Woo_Poly
*/
// In Cart and Checkout pages
function tlc_translate_shipping_label( $label ) {
return __( $label , 'woocommerce' );
}
add_filter( 'woocommerce_shipping_rate_label', 'tlc_translate_shipping_label', 10, 1 );
// In My Accoutn page, Order Emails and Paypal request
function tlc_translate_order_shipping_method( $implode, $instance ) {
// Convert the imploded array again to an array that is easy to manipulate
$shipping_methods = explode( ', ', $implode );
// Array with translated shipping methods
$translated = array();
foreach ( $shipping_methods as $shipping ) {
// Polylang will take care of the translation
$translated[] = __( $shipping, 'woocommerce' );
}
// Implode array to string again
$translated_implode = implode( ', ', $translated );
return $translated_implode;
};
add_filter( 'woocommerce_order_shipping_method', 'tlc_translate_order_shipping_method', 10, 2 );
/**
* Fix Payment gateway and respective description not translated by Woo_Poly
*/
function tlc_translate_payment_gateway_title( $title, $id ) {
return __( $title , 'woocommerce' );
}
add_filter( 'woocommerce_gateway_title', 'tlc_translate_payment_gateway_title', 10, 2 );
function tlc_translate_payment_gateway_description( $description, $id ) {
return __( $description , 'woocommerce' );
}
add_filter( 'woocommerce_gateway_description', 'tlc_translate_payment_gateway_description', 10, 2 );