Last active
December 20, 2018 06:03
-
-
Save maheshwaghmare/91c5a0addc98f7d057a9901d1f441e53 to your computer and use it in GitHub Desktop.
Fix: WooCommerce - Sorry, this file type is not permitted for security reasons.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Fix: WooCommerce - Sorry, this file type is not permitted for security reasons. | |
* | |
* @since 1.0.0 | |
*/ | |
if( ! function_exists( 'prefix_woocommerce_csv_product_import_valid_filetypes' ) ) : | |
function prefix_woocommerce_csv_product_import_valid_filetypes( $defaults ) { | |
// Override for the PHP version 7.2. | |
$defaults['csv'] = 'text/plain'; | |
return $defaults; | |
} | |
add_filter( 'woocommerce_csv_product_import_valid_filetypes', 'prefix_woocommerce_csv_product_import_valid_filetypes' ); | |
endif; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment