mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-05-01 11:52:25 +08:00
https://stackoverflow.com/questions/78051158/changing-the-all-filename-field-of-woocommerce-products
7 lines
232 B
Text
7 lines
232 B
Text
add_filter('woocommerce_file_download_filename', 'custom_download_filename',
|
|
10, 2);
|
|
|
|
function custom_download_filename($filename, $product_id) {
|
|
// You can replace "free download" with any text you want.
|
|
return 'free download';
|
|
}
|