For the complete documentation index, see llms.txt. This page is also available as Markdown.

weglot_ajax_replace_urls

When Weglot translate json content, we don't translate all entry. With this filter you can modifiy the keys we translate for url.

by default we translate this keys :

[ 'redirecturl', 'url', 'link' ]

The filter receives this array and must return it.

add_filter( 'weglot_ajax_replace_urls', 'custom_weglot_ajax_replace_urls' );
function custom_weglot_ajax_replace_urls( $keys ) {
    $keys[] = 'checkout_url';
    return $keys;
}

Last updated