• Resolved samuelashbr00k

    (@samuelashbr00k)


    Hi, i was just wondering if anyone would be able to help me out, the site that i am working on is displaying a warning on both admin and customer emails. It states that the use of undefined constant tax will throw an error however, i cannot seem to locate what is causing the issue. Many thanks.

    These are the lines in the email-order-details.php file:
    62 | <?php
    63 | $item_totals = $order->get_order_item_totals();
    64 |
    65 | if ( $item_totals ) {
    66 | $i = 0;
    67 | foreach ( $item_totals as $total ) {
    68 | $i++;
    69 | ?>`

    Warning: Use of undefined constant tax – assumed ‘tax’ (this will throw an Error in a future version of PHP) in /home/customer/www/website/public_html/wp-content/themes/website/resources/views/woocommerce/emails/email-order-details.php on line 69

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,

    This kind of problem is usually caused by a conflict with your theme or with another plugin. The best way to determine this is to:

    • Temporarily switch your theme to Storefront
    • Disable all plugins except for WooCommerce
    • Test to see if the issue has been resolved

    If you’re not seeing the same problem after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated. To figure out which plugin is causing the problem, reactivate your other plugins one by one, testing after each, until you find the one causing conflict. You can find a more detailed explanation on how to do a conflict test here.

    We’ve not heard back from you in a while, so I’m marking this thread as resolved. Hopefully, you were able to find a solution to your problem! If you have further questions, please feel free to open a new topic.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Undefined constant tax causing warning message in emails’ is closed to new replies.