weglot_ajax_no_translate
This filter help you prevent Weglot to translate some ajax action. Here the list of action we don't translate :
The filter receives the list of AJAX actions Weglot never translates, and must return it. An admin-ajax.php request whose action parameter (POST or GET) is in the list is left untranslated.
add_filter( 'weglot_ajax_no_translate', 'custom_weglot_ajax_no_translate' );
function custom_weglot_ajax_no_translate( $actions ) {
$actions[] = 'my_ajax_action';
return $actions;
}The default list:
array(
'add-menu-item', // WP Core.
'query-attachments', // WP Core.
'avia_ajax_switch_menu_walker', // Enfold theme.
'query-themes', // WP Core.
'wpestate_ajax_check_booking_valability_internal', // WP Estate theme.
'wpestate_ajax_add_booking', // WP Estate theme.
'wpestate_ajax_check_booking_valability', // WP Estate theme.
'mailster_get_template', // Mailster Pro.
'mmp_map_settings', // MMP Map.
'elementor_ajax', // Elementor since 2.5.
'ct_get_svg_icon_sets', // Oxygen.
'oxy_render_nav_menu', // Oxygen.
'hotel_booking_ajax_add_to_cart', // Hotel booking plugin.
'imagify_get_admin_bar_profile', // Imagify Admin Bar.
'el_check_user_login', // Event list plugin.
'wcfm_ajax_controller', // wcfm_ajax_controller.
'jet_ajax_search', // jet_ajax_search.
'woofc_update_qty', // jet_ajax_search.
'et_fb_ajax_save', // Divi builder save.
'generate_wpo_wcpdf', // WooCommerce PDF Invoices & Packing Slips.
'wpamelia_api', // Amelia booking plugin.
)With the filter you can update this array by add or unset array index.
Last updated