<?php

/**
 * Change the default WooCommerce download limit reached message
 */
function custom_wc_override_default_strings( $translated_text, $text, $domain ) {
    if ( $domain === 'woocommerce' && $text === 'Sorry, you have reached your download limit for this file' ) {
        $translated_text = __( 'Your custom message goes here.', 'codewp' );
    }
    return $translated_text;
}
add_filter( 'gettext', 'custom_wc_override_default_strings', 20, 3 );
?>