From f2cd586b2288f687a038d179513fe206dcde9e9d Mon Sep 17 00:00:00 2001 From: Anastasio <73900974+anastas10s-afk@users.noreply.github.com> Date: Tue, 21 Mar 2023 22:40:03 +0200 Subject: [PATCH] Updated WebP section in wc-core-functions.php Removed, previously added, unnecessary filter, and already existing function in wc-rest-functions.php. --- .../woocommerce/includes/wc-core-functions.php | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/plugins/woocommerce/includes/wc-core-functions.php b/plugins/woocommerce/includes/wc-core-functions.php index 06111cc9813..f615b5521e5 100644 --- a/plugins/woocommerce/includes/wc-core-functions.php +++ b/plugins/woocommerce/includes/wc-core-functions.php @@ -2589,24 +2589,8 @@ function wc_cache_get_multiple( $keys, $group = '', $force = false ) { * * WebP files should be able to be imported in WooCommerce, as they've been supported in WordPress core since v5.8. */ -add_filter( 'woocommerce_rest_allowed_image_mime_types', 'more_mimes_to_exts' ); function more_mimes_to_exts( $mime_to_ext ){ $mime_to_ext['webp'] = 'image/webp'; return $mime_to_ext; } - -function wc_rest_allowed_image_mime_types() { - return apply_filters( - 'woocommerce_rest_allowed_image_mime_types', - array( - 'jpg|jpeg|jpe' => 'image/jpeg', - 'gif' => 'image/gif', - 'png' => 'image/png', - 'bmp' => 'image/bmp', - 'tiff|tif' => 'image/tiff', - 'ico' => 'image/x-icon', - 'webp' => 'image/webp', - ) - ); -}