在woocommerce 3中调整产品图像的缩放倍率
问题描述
我正在使用 Storefront 主题,并且一直想知道是否有办法在将鼠标悬停在产品图像上时调整其缩放级别.
这可以使用 woocommerce_single_product_zoom_options
专用过滤器钩子实现.
选项数组中的钩子未记录的可用参数是:
<块引用>
相关:
放大倍数设置为 0.7
之前:
I'm using the Storefront theme and have been wondering if there is a way to adjust the zooming level imposed on the product image upon hovering on it.
This is possible using woocommerce_single_product_zoom_options
dedicated filter hook.
The hook undocumented available parameters in the options array are:
Related: Available parameters details for WooCommerce product image zoom options
Usage with woocommerce_single_product_zoom_options filter hook to change the magnification level (for example we mill minimize the zoom level a bit less):
Code goes in functions.php file of your active child theme (or active theme). Tested and work.
Before with default magnification (set to 1
):
Before with magnification set to 0.7
:
这篇关于在woocommerce 3中调整产品图像的缩放倍率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!