• [12-Jan-2026 15:58:52 UTC] PHP Fatal error:  Uncaught TypeError: WP_Translation_Controller::translate(): Argument #1 ($text) must be of type string, array given, called in /home/alessykora-br/htdocs/br.alessykora.cz/wp-includes/l10n/class-wp-translations.php on line 144 and defined in /home/alessykora-br/htdocs/br.alessykora.cz/wp-includes/l10n/class-wp-translation-controller.php:263
    Stack trace:
    #0 /home/alessykora-br/htdocs/br.alessykora.cz/wp-includes/l10n/class-wp-translations.php(144): WP_Translation_Controller->translate()
    #1 /home/alessykora-br/htdocs/br.alessykora.cz/wp-includes/l10n.php(196): WP_Translations->translate()
    #2 /home/alessykora-br/htdocs/br.alessykora.cz/wp-includes/l10n.php(307): translate()
    #3 /home/alessykora-br/htdocs/br.alessykora.cz/wp-content/plugins/wishlist-and-compare/inc/base/class-thwwc-enqueue.php(101): __()
    #4 /home/alessykora-br/htdocs/br.alessykora.cz/wp-content/plugins/wishlist-and-compare/inc/base/class-thwwc-enqueue.php(49): THWWC\base\THWWC_Enqueue->enqueue_scripts()
    #5 /home/alessykora-br/htdocs/br.alessykora.cz/wp-includes/class-wp-hook.php(341): THWWC\base\THWWC_Enqueue->admin_enqueue_scripts_style()
    #6 /home/alessykora-br/htdocs/br.alessykora.cz/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters()
    #7 /home/alessykora-br/htdocs/br.alessykora.cz/wp-includes/plugin.php(522): WP_Hook->do_action()
    #8 /home/alessykora-br/htdocs/br.alessykora.cz/wp-admin/admin-header.php(123): do_action()
    #9 /home/alessykora-br/htdocs/br.alessykora.cz/wp-admin/admin.php(244): require_once('...')
    #10 {main}
    thrown in /home/alessykora-br/htdocs/br.alessykora.cz/wp-includes/l10n/class-wp-translation-controller.php on line 263

    Hi, this plugin doesn’t work with current WP version. Everything is fine, unless you need to go to the plugin settings.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter werfewr

    (@werfewr)

    Workaround, if someone needs:

    Error example
    WP_Translation_Controller::translate(): Argument #1 ($text) must be of type string, array given
    Stack trace points to:
    wp-content/plugins/wishlist-and-compare/inc/base/class-thwwc-enqueue.php

    Cause
    The plugin calls the translation function __() with an array (but __() expects a string). Newer WordPress versions enforce strict typing, so admin pages crash.Quick workaround (regain wp-admin access)

    1. Via FTP/SFTP/File Manager, rename the plugin folder:
      wp-content/plugins/wishlist-and-compare/wishlist-and-compare__off/
    2. Reload wp-admin (plugin will be deactivated automatically).

    Code fix (1-line change)

    Edit:
    wp-content/plugins/wishlist-and-compare/inc/base/class-thwwc-enqueue.php

    Find the line similar to:

    'wwmac_pageid' => __($this->pagedata(), 'wishlist-and-compare'),
    

    Replace with:

    'wwmac_pageid' => $this->pagedata(),
    

    Save. Re-enable plugin

    Rename the folder back to:
    wishlist-and-compare
    Then activate the plugin again in wp-admin.

    Note: This change may be overwritten by plugin updates.

    Plugin Support Elena

    (@elenathemehigh)

    We have forwarded this to our technical team, and we will be releasing a new version soon with the necessary fixes, along with compatibility updates for the latest versions of WordPress and WooCommerce.

    If you need this fix urgently, please raise a support ticket through our website, and we’ll be happy to share the updated plugin file with you.

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.