Disable automatic language files update in WooCommerce

Disable automatic language files update in WooCommerce on child sites.

Snippet Type

Execute on Child Sites

Snippet

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);

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.