1 回答

TA貢獻1934條經驗 獲得超2個贊
不要覆蓋任何核心文件...相反,您可以使用 woocommerce_single_product_carousel_options 過濾器掛鉤,如下所示:
add_filter( 'woocommerce_single_product_carousel_options', 'filter_single_product_carousel_options' );
function filter_single_product_carousel_options( $args ) {
? ? $args['animation']? ? ? = 'fade';
? ? $args['easing']? ? ? ? ?= 'swing';
? ? $args['controlNav']? ? ?= true;
? ? $args['slideshow']? ? ? = true;
? ? $args['touch']? ? ? ? ? = true;
? ? $args['animationSpeed'] = 1200;
? ? $args['slideshowSpeed'] = 3500;
? ? $args['animationLoop']? = true; // Breaks photoswipe pagination if true.
? ? $args['allowOneSlide']? = true;
? ? $args['prevText']? ? ? ?= "<";? // String - Set the text for the "previous" directionNav item
? ? $args['nextText']? ? ? ?= ">";? // String - Set the text for the "next" directionNav item
? ??
? ? return $args;
}
代碼位于活動子主題(或活動主題)的functions.php 文件中。它應該有效。
- 1 回答
- 0 關注
- 134 瀏覽
添加回答
舉報