Skip to content Skip to sidebar

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 24 replies, has 2 voices.

Last updated by Marcel 1 year, 9 months ago.

Assisted by: Marcel.

Author Posts
October 3, 2023 at 3:19 pm #14506613

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Hi,

thanks for the info. I finished the WooCommerce settings, but I can't see the variation table. It's configured to show after the add to cart button. Is there anything else missing in configuring this plugin?

Best Regards
Marcel

October 9, 2023 at 6:00 pm #14542069

stefanB-99

Hi again Marcel,

This is weird. Would it be able for me to add the divi theme to make it as close to the original as possible?

Best regards

October 10, 2023 at 9:01 am #14547693

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Hi,

I installed Divi, and it's the same. Did you add any shortcode from this plugin manually?

Best Regards
Marcel

October 10, 2023 at 9:24 am #14548035

stefanB-99

Hi again,

Yes, the shortcode is added to Theme builder.

October 10, 2023 at 9:30 am #14548091

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Hi,

please try to replicate it identically via the Theme Builder then.

Thanks!

Best Regards
Marcel

October 16, 2023 at 12:43 pm #14584751

stefanB-99

Hi again Marcel,

Sorry for my late replies here..

I've added the template used on the original page now. Please let me know if you need anything else.

October 16, 2023 at 4:05 pm #14586747

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Hi,

thanks for the info. I will report this now to our compatibility team, who will take a look and try to contact the authors about it so it can be adjusted in their code.

Best Regards
Marcel

October 16, 2023 at 4:40 pm #14586983

stefanB-99

Hi again,

Thank you very much for your help so far, and great support. Then I’ll hear from you when The compability team has any news.

Best regards

October 18, 2023 at 2:48 pm #14605911

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

(Internal Status Change)

October 23, 2023 at 9:22 am #14634971

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Hi,

we found a workaround for it. Can you please try to see if this works for you?

#1 Create a full backup

#2 Open /wp-content/plugins/woocommerce-variations-table/public/class-woocommerce-variations-table-public.php. In WooCommerce_Variations_Table_Public::variationsTable() around line 457, replace the following snippet:

} else {
	$attr = maybe_unserialize( get_post_meta( $product->get_id(), '_product_attributes' ) );
	$attr_name = $attr[0][$attr_name]['name'];
}

With:

} else {
	$attr = maybe_unserialize( get_post_meta( $product->get_id(), '_product_attributes' ) );
	$attr_name = $attr[0][$attr_name]['name'];

	// WPML Workaround for compsupp-7016
	if (class_exists('Sitepress')) {
		$string = $attr_name;
		$textdomain = 'WordPress';
		$string_name = 'WPML Workaround: '.substr($string, 0, 20);

		$wpml_default_lang = apply_filters('wpml_default_language', NULL );
		$wpml_current_lang = apply_filters( 'wpml_current_language', NULL );

		if ($wpml_default_lang == $wpml_current_lang ) {
			do_action( 'wpml_register_single_string', $textdomain, $string_name, $string );
		}	
		// Apply the translation to the string
		$attr_name = apply_filters('wpml_translate_single_string', $string , $textdomain, $string_name);
	}
}

#3 Visit the page on front-end, so the strings can get registered
#4 Go to WPML > String Translation and change the language of the strings to Norwegian as described here: https://wpml.org/documentation/getting-started-guide/string-translation/how-to-change-the-source-language-of-strings/.

#5 Translate the Strings to English

Please do it via FTP, as the plugins seem to have an error on line 505 and don't allow any changes via The WP File Editor on "Plugins":

If it works for you, you can inform the authors of this plugin about the workaround so that they can integrate that into their codebase.

Best Regards
Marcel