Open
Reported for: Advanced Custom Fields Multilingual 2.0.5
Overview of the issue
In some situations, you may find the following fatal error when trying to translate variable products in WooCommerce Multilingual:
[07-Dec-2023 15:00:47 UTC] PHP Fatal error: Uncaught TypeError: array_filter(): Argument #1 ($array) must be of type array, string given in .../wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-editor-ui-product-job.php:610
Workaround
Please, make sure of having a full backup of your site before proceeding.
- Open …/wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-editor-ui-product-job.php file.
- Look for line 602.
- Replace:
$custom_fields = $this->get_custom_field_values( $this->product_id, $custom_field );
- With:
$custom_fields = $this->get_custom_field_values( $element_id, $custom_field );
Thank you very much for showing how to solve the problem. It helped.
I just have a question: won’t updating the WooCommerce Multilingual plugin remove this workaround and will it have to be implemented every time after the update?
Hello Miroslaw,
This issue will be solved in a future release of WooCommerce Multilingual. However until it is confirmed, updating this plugin will remove the workaround and it will be needed to add it again.
We will keep this link updated.
Regards
Hi, this is still broken, is there an ETA for the fix?
Thanks
Hello Andrea,
This fix will be included in WooCommerce Multilingual 5.4.0. However I can’t provide you an ETA of its release, it totally depends on the devs roadmap.
We will keep this page updated.
Regards