• Resolved Themis Theodoridis

    (@themisth)


    Hi,

    I’m getting the following PHP notices in my WordPress debug log:

    PHP Notice: Function _load_textdomain_just_in_time was called incorrectly.
    Translation loading for the greek-vat-invoices-for-woocommerce domain was triggered too early.
    Translations should be loaded at the init action or later.
    (This message was added in WordPress 6.7.0.)
    
    PHP Notice: Function woocommerce_register_additional_checkout_field was called incorrectly.
    Additional checkout fields should be registered on the woocommerce_init action or later.
    (This message was added in WooCommerce 11.0.0.)
    

    These notices are being logged repeatedly and are filling up the debug log.

    Could you please check whether the plugin is loading its translations and registering its WooCommerce checkout fields too early? It seems that some of the plugin code may need to be moved to init / woocommerce_init or a later hook.

    Please let me know if this is a known issue and whether a fix is planned.

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Theodore Sfakianakis

    (@irmaiden)

    Hi,

    Thanks for the detailed report — that’s a really clear write-up and it helped a lot in tracking this down quickly.

    You were right on both counts. The plugin’s Block Checkout field registration was hooked to woocommerce_blocks_loaded, which fires before WordPress’s init action. That’s too early for the field labels’ translation strings (triggering the WP 6.7+ notice) and too early for woocommerce_register_additional_checkout_field() itself (triggering the WC 11.0+ notice) — both notices were two symptoms of the same root cause.

    Fixed in v1.2.3, already published: field registration now runs on woocommerce_init instead, which is what WooCommerce’s own guidance recommends. It’s a hook-timing fix only — no behavior change, fields register and work exactly the same. I verified it against a real WooCommerce 11.1.0 install with WP_DEBUG/WP_DEBUG_LOG on and confirmed both notices are gone.

    Please update to 1.2.3 and let me know if you still see the notices afterward.

    Thanks again for flagging it!

    Thread Starter Themis Theodoridis

    (@themisth)

    Thanks for the quick response and fix! I’ve updated to v1.2.3 and everything looks good.

    Really appreciate it!

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

You must be logged in to reply to this topic.