weglot_xml_treat_page
This filter allow you to modifiy the translated content when this one is xml.
The filter receives the translated XML response (a string, for example a sitemap) and must return it. weglot_html_treat_page has already run on it.
add_filter( 'weglot_xml_treat_page', 'custom_weglot_xml_treat_page' );
function custom_weglot_xml_treat_page( $xml ) {
// Edit the translated XML here.
return $xml;
}Last updated