Last active
February 28, 2025 17:56
-
-
Save nosilver4u/bc44efdb9f4163f0b37703135fa3c21d to your computer and use it in GitHub Desktop.
Disable Woo thumbs and auto re-generation
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 | |
/* | |
Plugin Name: Disable Woo Thumbs | |
Description: Disables all thumbs from WooCommerce and prevents them being regenerated. | |
Version: 1.0.0 | |
*/ | |
add_action( 'init', 'disable_woo_thumbs_on_init' ); | |
function disable_woo_thumbs_on_init() { | |
remove_image_size( 'uncode_woocommerce_nav_thumbnail_regular' ); | |
remove_image_size( 'uncode_woocommerce_nav_thumbnail_crop' ); | |
remove_image_size( 'shop_thumbnail' ); | |
remove_image_size( 'shop_single' ); | |
remove_image_size( 'shop_catalog' ); | |
remove_image_size( 'woocommerce_gallery_thumbnail' ); | |
remove_image_size( 'woocommerce_single' ); | |
remove_image_size( 'woocommerce_thumbnail' ); | |
add_filter( 'woocommerce_background_image_regeneration' , '__return_false' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment