WPML
Статус
Решена
Тип
Ошибка
Заявлено для
Advanced Custom Fields Multilingual 2.0.5
Связанный плагин/тема
Advanced Custom Fields (ACF)
Теги темы
Compatibility

Обзор проблемы

В некоторых ситуациях Вы можете столкнуться со следующей фатальной ошибкой при попытке перевести вариативные товары в WPML Multilingual и Мультивалютность для WooCommerce:

[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

Обходное решение

Пожалуйста, перед продолжением убедитесь, что у Вас есть полная резервная копия сайта.


  • Откройте файл …/wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-editor-ui-product-job.php.

  • Найдите строку 602.

  • Замените:
    $custom_fields            = $this->get_custom_field_values( $this->product_id, $custom_field );

  • На:
    $custom_fields            = $this->get_custom_field_values( $element_id, $custom_field );

Все известные проблемы