0
我想要自定义WooCommerce请求报价插件,并且我无法获得更改的过滤器。这个插件使用JS Ajax,以及PHP重新加载。自定义WooCommerce通过过滤器请求报价信息
这是插件文件类的代码,这是不模板文件夹中:
if ($return == 'true') {
$message = apply_filters('yith_ywraq_product_added_to_list_message', __('Product added!', 'yith-woocommerce-request-a-quote'));
}
elseif ($return == 'exists') {
$message = apply_filters('yith_ywraq_product_already_in_list_message', __('Product already in the list.', 'yith-woocommerce-request-a-quote'));
}
elseif (count($errors) > 0) {
$message = apply_filters('yith_ywraq_error_adding_to_list_message', $this->get_errors($errors));
}
在主题function.php,我已经把这个:
function change_message() {
$message = 'Enquiry Added!';
echo apply_filters('yith_ywraq_product_already_in_list_message', $message);
}
add_filter('yith_ywraq_error_adding_to_list_message', 'change_message');
但我不能让它改变文字,它仍然是一样的。我不明白我错过了什么,任何人都可以指向它?
在此先感谢。
阿迪