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.

Tagged: 

This topic contains 6 replies, has 2 voices.

Last updated by Long Nguyen 1 year, 7 months ago.

Assisted by: Long Nguyen.

Author Posts
October 14, 2023 at 2:44 pm #14577341

fm-mehediH

Hi,
I am facing an issue with my product update. I have an import file with wp all import which imports all the data correctly.
But when I activate the wpml plugin the product custom taxonomy is not working.
Please check this video for more explanation.

hidden link

Let me know if this clarifies the issue.

October 16, 2023 at 7:18 am #14581653

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi there,

Thank you for contacting WPML support, I'd be happy to help you with this issue.

According to your screen record, I see when editing the product and quickly updating, the custom taxonomy is updated correctly.
I suggest you can go to WPML > Support > Troubleshooting > Click on some buttons below and see if it helps:
- [Products, Variations] Synchronize posts taxonomies
- Clear the cache in WPML
- Remove ghost entries from the translation tables
- Fix element_type collation
- Fix WPML tables collation
- Set language information
- Fix terms count
- Fix post type assignment for translations
❌ IMPORTANT: Please backup your database and website before proceeding ❌

Also, please create the terms and translate them before importing products in a second language, following the documentation https://wpml.org/documentation/related-projects/wpml-all-import-plugin-website-import-with-wpml/importing-multiple-languages-with-wp-all-import-and-wpml/#step-2-create-your-taxonomies-in-wordpress

Look forward to your reply.
Thanks

October 17, 2023 at 6:41 am #14589985

fm-mehediH

Hello Long,
Thank you for reviewing and providing feedback. I did the above steps as you mentioned. However, the issue remains the same. It does not assign the custom taxonomy.
Can you check again, please?

October 17, 2023 at 7:20 am #14590363

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to have a testing site where the issue is replicated. Your next reply is set to private to share the info.

❌ IMPORTANT: Please backup your database and website before proceeding ❌
You can use this plugin to create the backup: https://wordpress.org/plugins/duplicator/
✙ I would need your permission to de-activate and re-activate Plugins and the Theme to change configurations on the site if needed. This is also a reason the backup is critical.

Look forward to your reply.
Thanks

October 17, 2023 at 8:32 am #14591399

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I see you are using a custom code to create a shortcode and display the Product Families list in the frontend. I would like to inform you that helping you with custom code, is out of the scope of WPML, but I suggest you can try:

- Backup your database and website before proceeding
- Edit the file functions.php in the child theme folder.
- Around line 81, replace the code

$terms = get_terms( 'product_family', $args );

with this one

$terms = get_terms( 
    array(
        'taxonomy' => 'product_family',
        'hide_empty' => false,
    ) 
);

Refer to WordPress documentation https://developer.wordpress.org/reference/functions/get_terms/

If you are not able to accomplish this, I would recommend you contact one of our certified partners who will be more than happy to help you with this. In this link, you will find a list of our certified partners: https://wpml.org/contractors/

Regards.

October 19, 2023 at 1:24 pm #14615585

fm-mehediH

Hi Long,
That doesn't solve the problem. The code you mentioned only shows the empty product families too. But it doesn't sync taxonomies.

The problem is wpml prevents products from sync taxonomies. Our main site //hidden link with the same configuration that our development site has (hidden link).

I am looking for a solution from you.

Thanks,
Mehedi

October 20, 2023 at 3:06 am #14620221

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Can you please share some screenshots or a screen record of the state "it doesn't sync taxonomies"?

In your custom code, I see the not-empty product families will be displayed

$args = array( 'hide_empty=0' );
	echo _e('<h4>Produktfamilie</h4>', 'wpml-filter-text') ; 
$terms = get_terms( 'product_family', $args );

In the admin area > Products > Product Families, I see only 4 product families have associated products and they are displayed in the frontend. Please check these screenshots
hidden link
hidden link

And here is a screen record when I deactivate WPML on the staging site, nothing changes
hidden link

Look forward to your reply.
Thanks