Advertisement
Guest User

Untitled

a guest
Jun 29th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. <?php // Only copy this line if needed
  2.  
  3. /**
  4. * This function will add zip files back to the allowed mime types WooCommerce can use
  5. *
  6. * @param array $mimes The allowed mime types
  7. * @return array The filtered allowed mime types
  8. */
  9. function give_zip_back_to_wc( $mimes ) {
  10.  
  11. if ( ! isset( $mimes['zip'] ) || 'application/zip' != $mimes['zip'] ) {
  12. $mimes['zip'] = 'application/zip';
  13. }
  14.  
  15. return $mimes;
  16. }
  17. add_filter( 'woocommerce_downloadable_file_allowed_mime_types', 'give_zip_back_to_wc', 999 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement