woocommerce_background_image_regeneration

woocommerce_background_image_regeneration

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_background_image_regeneration') is found 4 times:

  • /includes/class-wc-regenerate-images.php line 46
    		if ( method_exists( 'Jetpack', 'is_module_active' ) && Jetpack::is_module_active( 'photon' ) ) {
    			return;
    		}
    
    		if ( apply_filters( 'woocommerce_background_image_regeneration', true ) ) {
    			include_once WC_ABSPATH . 'includes/class-wc-regenerate-images-request.php';
    
    			self::$background_process = new WC_Regenerate_Images_Request();
    
    			add_action( 'admin_init', array( __CLASS__, 'regenerating_notice' ) );
    			add_action( 'woocommerce_hide_regenerating_thumbnails_notice', array( __CLASS__, 'dismiss_regenerating_notice' ) );
    
  • /includes/customizer/class-wc-shop-customizer.php line 528
    	 */
    	private function add_product_images_section( $wp_customize ) {
    		if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'photon' ) ) {
    			$regen_description = ''; // Nothing to report; Jetpack will handle magically.
    		} elseif ( apply_filters( 'woocommerce_background_image_regeneration', true ) && ! is_multisite() ) {
    			$regen_description = __( 'After publishing your changes, new image sizes will be generated automatically.', 'woocommerce' );
    		} elseif ( apply_filters( 'woocommerce_background_image_regeneration', true ) && is_multisite() ) {
    			/* translators: 1: tools URL 2: regen thumbs url */
    			$regen_description = sprintf( __( 'After publishing your changes, new image sizes may not be shown until you regenerate thumbnails. You can do this from the <a href="%1$s" target="_blank">tools section in WooCommerce</a> or by using a plugin such as <a href="%2$s" target="_blank">Regenerate Thumbnails</a>.', 'woocommerce' ), admin_url( 'admin.php?page=wc-status&tab=tools' ), 'https://en-gb.wordpress.org/plugins/regenerate-thumbnails/' );
    		} else {
    			/* translators: %s: regen thumbs url */
    
  • /includes/customizer/class-wc-shop-customizer.php line 530
    		if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'photon' ) ) {
    			$regen_description = ''; // Nothing to report; Jetpack will handle magically.
    		} elseif ( apply_filters( 'woocommerce_background_image_regeneration', true ) && ! is_multisite() ) {
    			$regen_description = __( 'After publishing your changes, new image sizes will be generated automatically.', 'woocommerce' );
    		} elseif ( apply_filters( 'woocommerce_background_image_regeneration', true ) && is_multisite() ) {
    			/* translators: 1: tools URL 2: regen thumbs url */
    			$regen_description = sprintf( __( 'After publishing your changes, new image sizes may not be shown until you regenerate thumbnails. You can do this from the <a href="%1$s" target="_blank">tools section in WooCommerce</a> or by using a plugin such as <a href="%2$s" target="_blank">Regenerate Thumbnails</a>.', 'woocommerce' ), admin_url( 'admin.php?page=wc-status&tab=tools' ), 'https://en-gb.wordpress.org/plugins/regenerate-thumbnails/' );
    		} else {
    			/* translators: %s: regen thumbs url */
    			$regen_description = sprintf( __( 'After publishing your changes, new image sizes may not be shown until you <a href="%s" target="_blank">Regenerate Thumbnails</a>.', 'woocommerce' ), 'https://en-gb.wordpress.org/plugins/regenerate-thumbnails/' );
    		}
    
  • /includes/rest-api/Controllers/Version2/class-wc-rest-system-status-tools-v2-controller.php line 223
    			);
    		}
    
    		// Jetpack does the image resizing heavy lifting so you don't have to.
    		if ( ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'photon' ) ) || ! apply_filters( 'woocommerce_background_image_regeneration', true ) ) {
    			unset( $tools['regenerate_thumbnails'] );
    		}
    
    		if ( ! function_exists( 'wc_clear_template_cache' ) ) {
    			unset( $tools['clear_template_cache'] );
    		}