• While creating a new submission these warnings appeared:

    Warning: Use of undefined constant STATE_SUBMITTED - assumed 'STATE_SUBMITTED' (this will throw an Error in a future version of PHP) in vat-moss/includes/admin/new-submission.php on line 42
    
    Warning: Use of undefined constant STATE_ACKNOWLEDGED - assumed 'STATE_ACKNOWLEDGED' (this will throw an Error in a future version of PHP) in vat-moss/includes/admin/new-submission.php on line 42

    I am using the latest plugin version in WP 5.0.2.

Viewing 1 replies (of 1 total)
  • Plugin Author bseddon

    (@bseddon)

    Hi Martin

    Thanks for the information. The message will not affect what you want to do and occurs because the block of code defined by lines 41-49 in new-submission.php should not be there – they are part of a feature never implemented.

    Until an update is pushed out, to remove this block you have 3 choices of the steps you can take to remove the message from your log file:

    1) Define constants STATE_SUBMITTED and STATE_ACKNOWLEDGED in your functions.php file. Use the values ‘STATE_SUBMITTED’ and ‘STATE_ACKNOWLEDGED’ to avoid any issues. Using ‘published’ would be a bad idea.

    2) Remove the lines 41-49 from ./includes/admin/new-submissions.php

    3) Install the VAT-ECSL plugin from this site (https://wordpress.org/plugins/vat-ecsl/). Although you do not need this plugin (because it supports a reporting requirement of UK businesses) the feature never implemented in VAT-MOSS is implemented in the VAT-ECSL plugin so the constants are defined by this plugin. I never see the message in the log because I have the VAT-ECSL plugin installed.

    Regards

    Bill

Viewing 1 replies (of 1 total)
  • The topic ‘Warning about undefined constants’ is closed to new replies.