Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎯 fix: Translation cache not flashing after updating plugin language directory files #2329

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2950,8 +2950,10 @@ function dokan_get_translations_for_plugin_domain( $domain, $language_dir = null
* @return array
*/
function dokan_get_jed_locale_data( $domain, $language_dir = null ) {
$plugin_language_dir = WP_LANG_DIR . '/plugins/';

// get transient key
$transient_key = sprintf( 'dokan_i18n-%s-%d-%s', $domain, filectime( $language_dir ), get_user_locale() );
$transient_key = sprintf( 'dokan_i18n-%s-%d-%d-%s', $domain, filectime( $language_dir ), filectime( $plugin_language_dir ), get_user_locale() );

// check if data exists on cache or not
$locale = Cache::get_transient( $transient_key );
Expand Down
Loading