until now, i had no problem translating words using gettext filter, now i want to translate some words of woocommerce subscription plugin, it is as follows :
<?php echo esc_html_x( 'Next payment', 'table heading', 'woocommerce-subscriptions' ); ?>
i want to translate it using the following code, but it does not translate
function customize_gettext( $translated, $untranslated ) {
if ( $untranslated == 'Next payment' ) {
$translated = __( 'text', 'woocommerce-subscriptions' );
}
return $translated;
} add_filter( 'gettext', 'customize_gettext', 97, 3 );
where is the problem with my work? Thank you for guiding me