按价格过滤,更改按钮标签

I'm not really sure which plugin is this but I'm gonna take a risk asking. I already tried searching but I couldn't find a way to change the text of the button labeling Filter.

enter image description here

I wanted to change it to Apply Filter instead of Filter.

enter image description here

No available option in the widget, so I think some kind of hook can change it.

This question is particularly to WordPress and Woocommerce, I'm not sure though if it is part of Woocommerce but it is available in Appearance > Widget.

评论
  • tut
    tut 回复

    该小部件使用以下模板文件,可以对其进行覆盖和编辑

    https://github.com/woocommerce/woocommerce/blob/master/templates/content-widget-price-filter.php line: 30

    • The template for displaying product price filter widget.
    • This template can be overridden by copying it to yourtheme/woocommerce/content-widget-price-filter.php

    更换

    <button type="submit" class="button"><?php echo esc_html__( 'Filter', 'woocommerce' ); ?></button>
    

    <button type="submit" class="button"><?php echo esc_html__( 'Apply Filter', 'woocommerce' ); ?></button>