- 状态
- 已由作者解决
- 相关插件/主题
- MC4WP: Mailchimp for WordPress
- 主题标签
- Compatibility
问题概述
适用于 WooCommerce 的 [MC4WP] – Mailchimp for WordPress 集成不会在前端显示已翻译的结账复选框标签,尽管翻译在 WPML 的字符串翻译中正确显示。
临时解决方法
请确保在继续操作之前对您的站点进行完整备份。
- 打开 …/wp-content/plugins/mailchimp-for-wp/includes/integrations/class-integration.php文件。
- 找到第 168 行。
- 将:
public function get_label_text() { $integration = $this; $label = $this->options['label']; if (empty($label)) { $default_options = $this->get_default_options(); $label = $default_options['label']; }
- 替换为:
public function get_label_text() { $integration = $this; $label = $this->options['label']; if (empty($label)) { $default_options = $this->get_default_options(); $label = __( $default_options['label'], 'mailchimp-for-wp' ); } else { do_action( 'wpml_register_single_string', 'mailchimp-for-wp', 'Checkout Label', $label ); $label = apply_filters( 'wpml_translate_single_string', $label , 'mailchimp-for-wp', 'Checkout Label' ); }