mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-04-29 11:32:21 +08:00
12 lines
538 B
Text
12 lines
538 B
Text
function prevent_plugin_language_file_update($update, $plugin, $language) {
|
|
// Specify the plugin folder name for which you want to prevent language file updates
|
|
$plugin_folder = 'woocommerce';
|
|
|
|
// Check if the plugin being updated matches the specified folder name
|
|
if (strpos($plugin, $plugin_folder) !== false) {
|
|
$update = false; // Disable automatic language file updates for the specified plugin
|
|
}
|
|
|
|
return $update;
|
|
}
|
|
add_filter('auto_update_translation', 'prevent_plugin_language_file_update', 10, 3);
|