I think you just need to load the translations earlier to make them available for ajax hooks:
add_action( 'plugins_loaded', 'myplugin_load_textdomain' );
function myplugin_load_textdomain() {
load_plugin_textdomain( 'myplugin', false, basename( dirname( __FILE__ ) ) . '/languages' );
}
Related Posts:
- Get returned variable from a function to add_shortcode function
- WordPress Ajax callback function from plugin – OOP
- Plugin translations not installed but… strings are translated!
- template_redirect or admin-ajax.php?
- Ajax +wordpress onClick link redirect to new page and create html content
- Translations only load from `wp-content/languages/plugins` but not from the plugin’s languages folder
- Translation not working for Constant strings in Plugin
- Load textdomain from global languages directory
- Trigger a JavaScript function based on the data fetched from Woo commerce hook
- How to use native wordpress translation domain inside a custom plugin?
- ajaxurl not defined on front end
- add_action hook for completely new post?
- Why does WordPress add 0 (zero) to an Ajax response?
- Saving data-URI to media library
- How can I run AJAX on a button click event?
- WordPress Hook for user register
- Empty POST data on server on AJAX request using Angular $http
- What’s the earliest point I can get the queried object ID?
- wp_localize_script $handle
- How to enable users to down-vote in this simple voting counter (that uses the post meta)?
- How to check if certain plugin exists and in expected version
- Plugin development, hooks, generate content
- Hook event for upload image in the menu
- Help with callback using do_action_ref_array
- Built in admin ajax hooks?
- Using Ajax call in jQuery doesn’t work in widget
- Timeout on Admin-Ajax?
- Plugin Localization
- Comment `Reply` link doesn’t work if comments are loaded from ajax
- Woocommerce – Hide a Column in Cart Table
- Ajax in WordPress – path issue
- How to delete an user including data from custom database tables
- Should action callbacks start with a verb?
- Why is my javascript not invoked in my hooks except wp_head?
- Should shorcodes in i18n plugins be translated and if so, how?
- Namespaced action and filter tags
- What filter should I use to insert a button inside on Media>Add New
- include wp-blog-header not working on MAMP
- How to use a hook to override an update_post_meta call in a plugin?
- External Authentication, session_tokens not destroyed on logout
- Woocommerce checkout update totals with datepicker
- Including the necessary functions for a custom ajax registration form
- correct way to call javascript into hook function
- Dashboard – get status and position of metaboxes and pass them to ajax method
- Prefixing plugin hooks (actions/filters) with a wrapper class or functions
- Send push when new post is published in a certain category
- Storing data in wordpress database from ajax call from different website
- Build a translation correcter plugin
- Translation per IP location [closed]
- Force HTTPS 301 redirect with hook
- What action hook can I use to add a JavaScript to a page post using a theme template that is not including get_header() nor get_footer()?
- Plugin uninstall function is not working
- Remove an action by extending class and replacing it
- How to prevent someone from entering strings without making it available for translation?
- Readme.txt seems to be cached but not the version
- Trying to get class to instantiate ONCE (or, “why do I keep punching myself in the head?”)
- Is hint for translator compulsory while internationalizing a string containing variables?
- Setting a JSON web token from a secondary api as a secure cookie on WordPress
- How do I get rid of my inclusion race-condition on wp_enqueue_script
- AJAX call to admin-ajax.php by subscriber returns home page
- Can I Hook Into the TinyMCE Insert/Edit Link Button to Use Shortlink For Post?
- Ajax function is not working on WordPress
- Borrowing of Previously Translated Strings by Child Plugin
- Restrict certain actions to plugin-specific admin menu pages only
- AJAX request not routing through proxy
- Ajax on the Administration Side of plugin – returns 0
- Include external po file for 3th party plugin to theme
- How to enhance a self developed plugin by its own plugin architecture
- GET request return value as error instead of success
- How to update global variables in plugin activation callback?
- `registration_errors` filter doesn’t seem to be called
- How to grab data after wp user search is complete
- ajax stopped working when not logged in wordpress
- Why does do_action pass a blank string as the first parameter if no $arg is set?
- ajax response strips multidimensional array and unable to decode
- Hook for validating and rejecting frontend image upload
- Does hooking into a plugin action / filter override the plugin’s function for that hook?
- Nested Hooks with do_action for performance reasons – safe/necessary?
- Using AJAX to submit and return data inside the WordPress Plugin Boiler Plate framework
- $_SESSION inside php function executed by AJAX
- Two same AJAX calls – one is working, other doesn’t
- remove different admin menu for specific users
- Add language localisation to javascript alert?
- How to store in the database directly the translation?
- How and when would I implement some code which would take data from one part of the Db and put it in another?
- WP Ajax on page load not working on bluehost but was working on Godaddy
- Can’t get query string in ajax call
- An adiitional function fires on my AJAX submit
- Fatal error: Call to a member function query() on a non-object in my ajaxpage
- How to translate WP plugin name?
- Send Webhook when post-status is publish or trash
- Using “add_image_size” to register custom image sizes inside plugins not working
- get the queried_object of an url
- Why my admin-ajax url returns 0 even after adding echo and die() at the end of function?
- WordPress plugin boilerplate AJAX functionality
- Translations not making it into Block UI but work in the rest of the plugin
- Custom fields in the billing address section woocommerce
- How to use useSelect to retrieve the currently default fontFamily?
- How to run this plugin every time a post is saved?
- Are woocommerce_thankyou hook and is_order_received_page() redundant? [closed]