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: WCML
Related documentation:
This topic contains 0 reply, has 0 voices.
Last updated by zakW 1 month, 3 weeks ago.
Assisted by: Itamar.
Author | Posts |
---|---|
April 14, 2025 at 1:48 pm #16929946 | |
zakW |
Background of the issue: Symptoms: Questions: |
April 14, 2025 at 1:57 pm #16929977 | |
Itamar WPML Supporter since 02/2016
Languages: English (English ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi, Can you please share the fatal error text here? Thanks, |
April 15, 2025 at 7:45 am #16932066 | |
zakW |
Hi Itamar, Here is the fatal error message: Message Uncaught Error: Call to a member function get_stock_quantity() on bool in /home/666716.cloudwaysapps.com/yzugytqyzx/public_html/wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-synchronize-product-data.php:379 Stack trace: #0 /home/666716.cloudwaysapps.com/yzugytqyzx/public_html/wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-synchronize-variations-data.php(249): WCML_Synchronize_Product_Data->sync_product_stock() #1 /home/666716.cloudwaysapps.com/yzugytqyzx/public_html/wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-synchronize-product-data.php(188): WCML_Synchronize_Variations_Data->sync_product_variations() #2 /home/666716.cloudwaysapps.com/yzugytqyzx/public_html/wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-synchronize-product-data.php(139): WCML_Synchronize_Product_Data->sync_product_data() #3 /home/666716.cloudwaysapps.com/yzugytqyzx/public_html/wp-includes/class-wp-hook.php(326): WCML_Synchronize_Product_Data->synchronize_products() #4 /home/666716.cloudwaysapps.com/yzugytqyzx/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #5 /home/666716.cloudwaysapps.com/yzugytqyzx/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() #6 /home/666716.cloudwaysapps.com/yzugytqyzx/public_html/wp-includes/post.php(4760): do_action() #7 /home/666716.cloudwaysapps.com/yzugytqyzx/public_html/wp-includes/post.php(4862): wp_insert_post() #8 /home/666716.cloudwaysapps.com/yzugytqyzx/public_html/wp-admin/includes/post.php(453): wp_update_post() #9 /home/666716.cloudwaysapps.com/yzugytqyzx/public_html/wp-admin/post.php(227): edit_post() #10 {main} thrown |
April 15, 2025 at 3:12 pm #16935045 | |
Itamar WPML Supporter since 02/2016
Languages: English (English ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi, Thanks for sharing the error details. We’ve reviewed the issue with our second-tier team, and based on the error message, it appears that the system is attempting to retrieve stock information from a product variation that doesn't exist or is not properly recognized — resulting in a fatal error when calling get_stock_quantity() on a boolean (false). Here’s what could be happening and how to investigate further: What Might Be Causing the Issue: A variation may be listed under the product that no longer exists or is incomplete. A variation may be assigned, but its translation is missing, or the postmeta data is corrupted. There could also be a database inconsistency, particularly in WooCommerce’s variation handling or post relationships. Suggested Steps to Investigate: Check the variations of the product that trigger the error: Look in the database (wp_posts) for entries where post_parent matches the product’s ID and post_type = 'product_variation'. Then, check if all of these variations are appropriately translated (in wp_icl_translations). If you're comfortable editing the code, you can add a temporary debug line before the error line in: /wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-synchronize-product-data.php error_log(var_export($product, true)); just before: $stock = $product->get_stock_quantity();
If you'd prefer, you can also send us a package of the site, and we can investigate the issue further. You can upload it to a service like Google Drive or Dropbox and share the link with me. Or you can give us access and allow me to take a copy of your site. I must install a plugin like Duplicator or All In One Migration for this. Please let me know if you agree. For this, I'll enable private messages for the following reply. Let us know how you'd like to proceed or if you’d like assistance checking the variation entries. We’re here to help! |
April 16, 2025 at 8:46 am #16937267 | |
zakW |
Hi I have a question: If we delete the variation on EN does it delete it automatically on other languages? |
April 16, 2025 at 5:23 pm #16940692 | |
Itamar WPML Supporter since 02/2016
Languages: English (English ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi, In WPML -> Settings -> Posts and pages synchronization, you need to select 'When deleting a post, delete translations as well', and then when you delete the English variable product, its translation, including the variations, will be deleted. Please note that sending a product to the trash section is not a complete deletion of it. You must permanently delete it from the trash section. Please let me know if you have any further questions. Regards, |
April 18, 2025 at 8:56 am #16946747 | |
zakW |
Thank you Itamer. A senior developer has been reviewing over this and I think it relates to an issue with missing German attributes suddenly missing their translations. I am closing this ticket and turning our focus on that particular ticket. |