doesn’t support wc function
-
Hello, I change the name of the download file for the user with this code, it is correct in woocommerce, but it seems that your plugin does not follow the settings of woocommerce.
What function should I replace to use this setting in your plugin?
function change_woocommerce_file_download_filename( $filename, $product_id ) { // Get the file extension from the processed file name. $filetype = wp_check_filetype( $filename ); // generate a new file using Product ID $new_file_name = 'New File Name'; // Join the new file name with file extension with (.). return join( '.', array( $new_file_name, $filetype['ext'] ) ); } add_filter( 'woocommerce_file_download_filename', 'change_woocommerce_file_download_filename', 10, 2 );
- The topic ‘doesn’t support wc function’ is closed to new replies.