Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Europe/Madrid (GMT+02:00)

This topic contains 13 replies, has 2 voices.

Last updated by Marcel 2 days, 6 hours ago.

Assisted by: Marcel.

Author Posts
September 23, 2024 at 9:30 am #16208253

FortunyShop

Background of the issue:
Set NEW Bubble on Woocommerce as Not Translatable
The NEW Bubble is created by FLATSOME theme and I want it to be set as COPY in all languages but cannot find the slug _bubble_new in the Custom fields in WPML settings

Symptoms:

Questions:
How do i set the custom field _bubble_new to COPY in all languages?

September 23, 2024 at 10:05 am #16208596

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Hi,

_custom_new as Custom Fields is considered a "System Field" (they start always with _).

Did you activate "System Fields" in WPML -> Settings -> Custom Field Translation? You should find it there once you press the link.

Best Regards
Marcel

system-fields.png
September 23, 2024 at 12:21 pm #16209519

FortunyShop

Nothing found even on system fields, please see screenshot

Screenshot 2024-09-23 141939.png
September 23, 2024 at 12:24 pm #16209545

FortunyShop

I guess this is the php file that creates that field into the FLATSOME theme:


<?php

add_action( 'wc_cpdf_init', 'wc_custom_product_data_fields', 10, 0 );

if ( ! function_exists( 'wc_custom_product_data_fields' ) ) {
	/**
	 * Custom WooCommerce product fields
	 *
	 * @return array
	 */
	function wc_custom_product_data_fields() {

		$custom_product_data_fields = array();

		$custom_product_data_fields['ux_product_layout_tab'] = array(
			array(
				'tab_name' => __( 'Product layout', 'flatsome' ),
			),
			array(
				'id'          => '_product_block',
				'type'        => 'select',
				'label'       => __( 'Custom product layout', 'flatsome' ),
				'style'       => 'width:100%;height:140px;',
				'description' => __( 'Choose a custom product block layout for this product.', 'flatsome' ),
				'desc_tip'    => true,
				'options'     => flatsome_get_block_list_by_id( array( 'option_none' => '-- None --' ) ),
			),
			array(
				'id'          => '_top_content',
				'type'        => 'textarea',
				'label'       => __( 'Top Content', 'flatsome' ),
				'style'       => 'width:100%;height:140px;',
				'description' => __( 'Enter content that will show after the header and before the product. Shortcodes are allowed', 'flatsome' ),
			),
			array(
				'id'          => '_bottom_content',
				'type'        => 'textarea',
				'label'       => __( 'Bottom Content', 'flatsome' ),
				'style'       => 'width:100%;height:140px;',
				'description' => __( 'Enter content that will show after the product info. Shortcodes are allowed', 'flatsome' ),
			),
		);

		$custom_product_data_fields['ux_extra_tab'] = array(
			array(
				'tab_name' => __( 'Extra', 'flatsome' ),
			),
			array(
				'id'          => '_bubble_new',
				'type'        => 'select',
				'label'       => __( 'Custom Bubble', 'flatsome-admin' ),
				'description' => __( 'Enable a custom bubble on this product.', 'flatsome' ),
				'desc_tip'    => true,
				'options'     => array(
					''      => 'Disabled',
					'"yes"' => 'Enabled',
				),
			),
			array(
				'id'          => '_bubble_text',
				'type'        => 'text',
				'label'       => __( 'Custom Bubble Title', 'flatsome-admin' ),
				'placeholder' => __( 'NEW', 'flatsome-admin' ),
				'class'       => 'large',
				'description' => __( 'Field description.', 'flatsome-admin' ),
				'desc_tip'    => true,
			),
			array(
				'type' => 'divider',
			),
			array(
				'id'          => '_custom_tab_title',
				'type'        => 'text',
				'label'       => __( 'Custom Tab Title', 'flatsome-admin' ),
				'class'       => 'large',
				'description' => __( 'Field description.', 'flatsome-admin' ),
				'desc_tip'    => true,
			),
			array(
				'id'          => '_custom_tab',
				'type'        => 'textarea',
				'label'       => __( 'Custom Tab Content', 'flatsome' ),
				'style'       => 'width:100%;height:140px;',
				'description' => __( 'Enter content for custom product tab here. Shortcodes are allowed', 'flatsome' ),
			),
			array(
				'type' => 'divider',
			),
			array(
				'id'          => '_product_video',
				'type'        => 'text',
				'placeholder' => '<em><u>hidden link</u></em>',
				'label'       => __( 'Product Video', 'flatsome' ),
				'style'       => 'width:100%;',
				'description' => __( 'Enter a Youtube or Vimeo Url of the product video here. We recommend uploading your video to Youtube.', 'flatsome' ),
			),
			array(
				'id'          => '_product_video_size',
				'type'        => 'text',
				'label'       => __( 'Product Video Size', 'flatsome-admin' ),
				'placeholder' => __( '900x900', 'flatsome-admin' ),
				'class'       => 'large',
				'description' => __( 'Set Product Video Size.. Default is 900x900. (Width X Height)', 'flatsome-admin' ),
				'desc_tip'    => true,
			),
			array(
				'id'          => '_product_video_placement',
				'type'        => 'select',
				'label'       => __( 'Product Video Placement', 'flatsome-admin' ),
				'description' => __( 'Select where you want to display product video.', 'flatsome' ),
				'desc_tip'    => true,
				'options'     => array(
					''    => 'Lightbox (Default)',
					'tab' => 'New Tab',
				),
			),
		);

		return $custom_product_data_fields;
	}
}


September 23, 2024 at 12:56 pm #16209782

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Hi,

you can try using an XML config as described here: https://wpml.org/documentation/support/language-configuration-files/custom-fields-translation-options/

Best Regards
Marcel

September 26, 2024 at 8:24 am #16223593

FortunyShop

I tried your solution but no result.
Please see screenshot.

THank you

Screenshot 2024-09-26 102232.png
September 26, 2024 at 4:55 pm #16226871

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Hi,

Could you please provide a site duplicator copy for further testing? Please note that our ability to test custom code is limited, but upon initial review, your code appears correct, same for the XML. I don’t see any immediate reason why the field isn’t being copied.

Thanks!

Best regards,
Marcel

September 27, 2024 at 7:55 am #16228709

FortunyShop

I already have a staging environment. Where can i find the private fields to send the credentials?

September 27, 2024 at 7:57 am #16228710

FortunyShop

Anyway the link you provided
https://wpml.org/faq/provide-supporters-copy-site/

redirects here
https://wpml.org/faq/checklist-before-opening-a-ticket-in-wpml-support/

September 27, 2024 at 1:22 pm #16230030

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Hi,

Apologies for the "wrong" link! I’ve checked with our documentation team, and it appears that the Duplicator guide has been removed and redirected. The next response is marked as private.

Best regards,
Marcel

September 30, 2024 at 6:00 pm #16237395

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Hello,

The text domain "flatsome-admin" cannot be registered for translation. The scan at hidden link freezes. A 403 error occurs at /wp-admin/admin-ajax.php.

This would explain why it is also unavailable for configuration under WPML -> Settings, as the scan cannot be completed.

To investigate further, I will need a hidden link">copy of the site to check it in an isolated environment using debug tools or at least full FTP access.

Best regards,
Marcel

October 1, 2024 at 9:28 am #16239196

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Thank you!

The source file looks correct. Please go ahead and install Flatsome in hidden link">this isolated Sandbox environment so we can replicate the issue from scratch. If it occurs here as well, we can inform our compatibility team.

They'll try working on a potential workaround and contact the theme's authors if necessary.

Best regards,
Marcel

October 1, 2024 at 10:09 am #16239417

FortunyShop

Ok done thank you very much.

October 2, 2024 at 11:48 am #16245286

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Thank you!

I wasn’t able to reproduce the compatibility issue on my end. I left the default language setting as "Disabled," and it was automatically copied as "Disabled" to the German translation as well. You can check this here: hidden link">Sandbox link.

I also tested it with the "Enabled" setting, made another translation, and found it in the translation editor as "field-wc_productdata_options-0-0-_bubble_new" with the value "yes." Translating it to "yes" correctly copied the value to the German version. I would not recommend changing the setting for this global field.

Could you please confirm this behavior on the Sandbox? The reason you're not seeing these fields in the WPML -> Settings section is that Flatsome handles them inside the "wc_productdata_options" field, which is set to "Translate" by default according to the XML-config included.

Best regards,
Marcel