• A partir do WP 6.7.0 o load_plugin_textdomain n?o deve ser chamado no init mas sim no after_setup_theme.

    Isso gera o notice abaixo:

    Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the woocommerce
    domain was triggered too early. This is usually an indicator for some
    code in the plugin or theme running too early. Translations should be
    loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/wp-includes/functions.php on line 6087

    Pra corrigir é só trocar sua linha

    add_action( 'init', array( $this, 'load_plugin_textdomain' ) );

    por

    add_action( 'after_setup_theme', array( $this, 'load_plugin_textdomain' ) );

    Isso só vai ser um problema depois da 6.7 que ainda ta em RC. Mas fica a dica. ??

  • You must be logged in to reply to this topic.