• I have an error poping up on some wordpress emails (I use woocomerce too) seems to be part of wordpress due to the location of error.

    Notice: email_order_items_table was called with an argument that is deprecated since version 2.5.0 with no alternative available. in /var/www/wp-includes/functions.php on line 3739

    I have PHP7 so probably is something related to it?? Or is something calling that in wordpress?? Then I will need to find the culprit maybe woocomerce! 🙂

    Looking forward to your thoughts.

    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Is your version of WooCommerce compatible with your version of WordPress?

    If so, have you tried resetting your server to run php 5.6 instead of 7 to see if the error goes away?

    I have this same problem. The email lists the products purchased without issue, but the error is the same:

    Notice: email_order_items_table was called with an argument that is deprecated since version 2.5.0 with no alternative available. in ~filepath/wp-includes/functions.php on line 3739

    Moderator t-p

    (@t-p)

    The error is about deprecated argument.

    Are your plugins/theme up to date?

    Moderator t-p

    (@t-p)

    @ohokic,

    If the troubleshooting already posted made no difference for you, then, as per the Forum Welcome, please post your own topic.

    This is a little late but in case still helpful:

    in Abstract Order (under WooCommerce/Classes)

    You can see that all the args except the first one have been deprecated
    * Output items for display in html emails.
    *
    * @param array $args Items args.
    * @param null $deprecated1 Deprecated arg.
    * @param null $deprecated2 Deprecated arg.
    * @param null $deprecated3 Deprecated arg.
    * @param null $deprecated4 Deprecated arg.
    * @param null $deprecated5 Deprecated arg.
    * @return string
    */
    public function email_order_items_table( $args = array(), $deprecated1 = null, $deprecated2 = null, $deprecated3 = null, $deprecated4 = null, $deprecated5 = null ) {
    ……………..
    ………………
    }

    You need to search for “$order->email_order_items_table” function in your theme or under a plugin which is sending email.

    Then change it to something like below:

    in your email templates under your woocommerce directory under your theme or a plugin you have
    something like this for your plain text email:

    echo “\n” . $order->email_order_items_table( $order->is_download_permitted(), true, $order->has_status( ‘processing’ ), ”, ”, true );

    This should be something like this depending on your requirements:
    “echo “\n” . $order->email_order_items_table( array(
    ‘show_sku’ => false,
    ‘show_image’ => false,
    ‘$image_size’ => array( 32, 32 ),
    ‘plain_text’ => true
    ) );”

    And for your non-plain text email you have something like this:
    “<?php echo $order->email_order_items_table( $order->is_download_permitted(), true, $order->has_status( ‘processing’ ) ); ?>”

    This should be something like this depending on your requirements:
    “<?php echo $order->email_order_items_table( array(
    ‘show_sku’ => false,
    ‘show_image’ => true,
    ‘$image_size’ => array( 32, 32 ),
    ‘plain_text’ => $plain_text
    ) ); ?>”

    HI I found I just had to update my email template in my theme file. Makes sense. I had customized the customer processing email.

    And the system status told me to, so now I know what to do next.
    Thanks!!

    You need to search for “$order->email_order_items_table” function in your theme or under a plugin which is sending email.

    Then change it to something like below:

    No, no, no! You NEVER edit theme, plugin, or core files. You may temporarily “fix” the current issue (you haven’t, really), but you WILL create further problems down the road.

    If you are getting “function deprecated” errors, then something is out of date on your system. That is the issue you need to fix.

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

The topic ‘Error while WP debug on’ is closed to new replies.