Translation Loading Timing Issue – WordPress 6.7+ Compatibility

Forums EU/UK VAT Manager for WooCommerce Translation Loading Timing Issue – WordPress 6.7+ Compatibility

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #179745
    AVSEC
    Participant

    Hello WPFactory Support Team,

    I’m experiencing a compatibility notice with the EU/UK VAT for WooCommerce Pro plugin on WordPress 6.9+.

    Issue Description:

    Query Monitor is reporting that the plugin is loading translations too early in the WordPress loading process:

    Translation loading for the eu-vat-for-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.
    (This message was added in version 6.7.0)

    Current Behavior:

    The plugin is calling load_plugin_textdomain() or load_textdomain() before the init hook, which is now flagged as incorrect timing in WordPress 6.9+.

    Expected Behavior:

    The translation loading should be deferred to the init action hook or later, following WordPress best practices.

    Suggested Solution:

    Wrap the translation loading in an init action hook:

    add_action( ‘init’, function() {
    load_plugin_textdomain(
    ‘eu-vat-for-woocommerce’,
    false,
    dirname( plugin_basename( __FILE__ ) ) . ‘/languages/’
    );
    } );

    Environment:
    – WordPress Version: 6.7+
    – Plugin: EU/UK VAT for WooCommerce Pro (latest version)
    – Query Monitor shows: Plugin: eu-vat-for-woocommerce-pro

    Impact:

    The plugin functions correctly, but this notice appears in debugging tools and should be resolved for proper WordPress 6.7+ compliance.

    Thank you for your excellent plugin and for addressing this compatibility issue!

    Best regards

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.