• Resolved mhogas

    (@mhogas)


    When WVS is enabled, the Thumb width & cropping options stop being properly saved in Customizer eg: https://d.pr/i/tCZ8FV .

    I just checked the code and seems like these 2 lines cause this:

    add_filter( 'pre_update_option_woocommerce_thumbnail_image_width', 'wvs_clear_transient' );
    add_filter( 'pre_update_option_woocommerce_thumbnail_cropping', 'wvs_clear_transient' );

    Try changing them like this below to pass the data.

    add_filter( 'pre_update_option_woocommerce_thumbnail_image_width', function($option){
    	wvs_clear_transient();
    	return $option;
    } );

    Or just make wvs_clear_transient to pass the filter’s data.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mhogas

    (@mhogas)

    Hi,

    Trust me, there’s no need for me to create a new ticket, you can report this bug to the devs directly and they’ll know what the problem is and apply the fix i posted.

    Hi @mhogas

    Please put the below code to your child theme’s functions.php or use it as a snippet using Code Snippet Plugin-

    if ( ! function_exists( 'wvs_support' ) ) {
    function wvs_support(){
    remove_filter( 'pre_update_option_woocommerce_thumbnail_image_width', 'wvs_clear_transient' );
    remove_filter( 'pre_update_option_woocommerce_thumbnail_cropping', 'wvs_clear_transient' );
    }
    add_action('admin_init', 'wvs_support');
    }

    Please let me know, is it resolved your issue or not.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WVS causes Customizer options (thumbnail width & cropping) to fail saving’ is closed to new replies.