Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php // Only copy this line if needed
- /**
- * This function will add zip files back to the allowed mime types WooCommerce can use
- *
- * @param array $mimes The allowed mime types
- * @return array The filtered allowed mime types
- */
- function give_zip_back_to_wc( $mimes ) {
- if ( ! isset( $mimes['zip'] ) || 'application/zip' != $mimes['zip'] ) {
- $mimes['zip'] = 'application/zip';
- }
- return $mimes;
- }
- add_filter( 'woocommerce_downloadable_file_allowed_mime_types', 'give_zip_back_to_wc', 999 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement