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.
This topic contains 9 replies, has 2 voices.
Last updated by bahadirB 4 years, 11 months ago.
Assisted by: Andreas W..
Author | Posts |
---|---|
April 26, 2020 at 8:21 pm #5997747 | |
bahadirB |
Hi, I am using woocommerce for facebook plugin and my site includes two other languages. I synced products with facebook page via this plugin. But there seems some problems; 1. The all producsts are not synced, some of them are missing for other languages, Best regards. |
April 28, 2020 at 7:48 pm #6015387 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, Thank you for contacting the WPML Support Forum. Could you please add this to the functions.php file of your theme: add_filter ('facebook_for_woocommerce_integration_prepare_product', 'fix_product_url', 11, 2); function fix_product_url($product_data, $id) { $product_lang = apply_filters( 'wpml_post_language_details', null, $id ); $product_data['url'] = apply_filters( 'wpml_permalink', $product_data['url'], $product_lang['language_code'] ); return $product_data; } Then I synced again with the Facebook page: WooCommerce->Settings->Integration -> Sync-ReSync This should solve the issue but take note that once you update Avada those changes will get overwritten. I would suggest creating a Child Theme in this case and place the code into a separate functions.php file. More information about how to create a Child Theme for Avada can be found here: Let me know if you do need any further assistance. Kind regards |
April 29, 2020 at 1:58 pm #6022241 | |
bahadirB |
Hi, I have changed the functions.php file as t.ly/agth . But I noticed that the file does not have closing PHP tag default. The changes do not affect the result. I still see products in three languages. For instance when I use english browser, I see products in three languages. My purpose is, to see customers see the products on their own language. Facebook gives information about this case as t.ly/aBWM. |
April 29, 2020 at 4:11 pm #6023287 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, 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 for a testing site where the issue is replicated. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it. Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you. IMPORTANT Please make a backup of site files and database before providing us access. Kind regards |
April 29, 2020 at 11:51 pm #6025359 | |
bahadirB |
Could you enable the private box please? |
April 29, 2020 at 11:55 pm #6025365 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, I am sorry about the inconvenience. The box has been enabled again. Kind regards |
April 30, 2020 at 12:45 am #6025491 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, I have visited your site right now and the first thing I see is that the WooCommerce Multilingual Setup is not completed. This setup is mandatory in order to use WPML with WooCommerce and defines a setup while creating the translations for WooCommerce pages automatically. Until now, the WooCommerce realted pages are not translated and you will need to use our plugin for translating the products. You will find the interface at WooCommerce -> WooCommerce Multilingual. Could you please complete the setup wizard and let me know if the issue persists? Kind regards |
April 30, 2020 at 1:44 am #6025515 | |
bahadirB |
Hi, I have completed the remaining setup and removed my facebook account and set again in order to re-sync. The same issues appear again. |
April 30, 2020 at 2:35 am #6025803 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, It seems this was a configuration issue. I had to adjust the default language of the permalinks, as they been titled in Turkish but assigned as English. Also, I see you are using WPML -> Settings -> Post Type Translation -> Products -> Translatable - use translation if available or fallback to default language. This will cause that products will now show up on the original language if a translation is not existing. Set this option to "Translatable - only show translated items" to exclude other languages. Now, could you please resync the Facebook account? There used to be an option for that but it seems it got removed. At the moment it seems to me that all products are appearing and the plugin is not filtering them by language. Take note, that for now, I have removed the earlier provided fix as its purpose was for translated products being able to show up. As mentioned, this seems not to be the issue, as I can see all products. The problem is they are not filtered by language on Facebook. Please let me know if you need further assistance. Kind regards |
April 30, 2020 at 11:40 am #6030427 | |
bahadirB |
Thank you for your great support. My issue is resolved now. Thank you! |