• I asked an AI to create a PHP snippet to ignore the “Auto Replace Current item with Populated Items” option. At least my menus are now working correctly in PHP8 without that option active. Here’s the code for anyone who wants to try or analyze it.

    We will await a definitive solution from the plugin developers.

    /**
    * JC Submenu
    * Force "Replace Current item with Populated Items"
    * a permanecer desativado.
    * Seguro para PHP 8.2+
    */

    if (!defined('ABSPATH')) {
    exit;
    }

    add_filter(
    'get_post_metadata',
    function ($value, $object_id, $meta_key, $single) {

    if ($meta_key !== 'jc-submenu-childpop') {
    return $value;
    }
    return $single ? '0' : array('0');
    },
    999,
    4
    );

You must be logged in to reply to this topic.