Checkout checkbox label is not translated with WPML
-
Hi there,
This is Nico from the WPML Compatibility team. I would like to report a compatibility issue with?MC4WP integration with WooCommerce.
1. Steps to Reproduce
- Go to “MC4WP > Integration > WooCommerce Checkout
- Enable it
- Add a custom Checkbox label text and save
- You won’t be able to translate it
2. Workaround provided to the client
- Open the …/wp-content/plugins/mailchimp-for-wp/includes/integrations/class-integration.php file.
- Look for line 168.
- Replace:
public function get_label_text()
{
$integration = $this;
$label = $this->options['label'];
if (empty($label)) {
$default_options = $this->get_default_options();
$label = $default_options['label'];
}- With:
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' );
}Could you please check if it’s possible to?fix this issue?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.