• Resolved davidba

    (@davidba)


    hello
    I would like to know how can I deactivate the zoom on the picture (item page) on mobile devices only

    thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author oceanwp

    (@oceanwp)

    Hello, the zoom on the products is a WooCommerce feature, I don’t know if it is possible to deactivate it only on mobile, you will need to ask to WooCommerce.
    I know how to do to disable this feature for all devices, but not only for mobile, sorry.

    add this function
    // REMOVE ZOOM MAGNIFIER FUNCTION PRODUCT PAGES //
    add_action( ‘after_setup_theme’, ‘remove_pgz_theme_support’, 100 );

    function remove_pgz_theme_support() {
    remove_theme_support( ‘wc-product-gallery-zoom’ );
    }

    add this function
    // REMOVE ZOOM MAGNIFIER FUNCTION PRODUCT PAGES in mobile devices

    remove_filter( ‘woocommerce_single_product_image_html’, ‘wpb_aiz_single_image_filter’ );
    add_action( ‘init’, ‘wpb_wiz_mobile_only’ );
    function wpb_wiz_mobile_only(){
    if ( !wp_is_mobile() ) {
    add_filter( ‘woocommerce_single_product_image_html’, ‘wpb_aiz_single_image_filter’ );
    }
    }

    • This reply was modified 6 years, 5 months ago by 7prny.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to deactivate zoom in mobile devices’ is closed to new replies.