Support » Plugin: WooCommerce Cart Abandonment Recovery » Admin EMail triggers PHP notice

  • Resolved titsmaker

    (@titsmaker)


    Hi. The plugin is awesome indeed.
    But there’s a small problem – when an email about recovered order is sent to admin (“New Customer Order – Recovered Order ID …”) two PHP notices appear in my log:
    1)

    Notice: Undefined variable: additional_content in /wp-content/plugins/woocommerce/templates/emails/admin-new-order.php on line 51

    2)

    Notice: Trying to get property ‘id’ of non-object in /wp-content/plugins/code-snippets/php/snippet-ops.php(446) : eval()’d code on line 3

    this one is realted to my snippet adding tracking number to order completed email, here’s the snippet:

    add_action( 'woocommerce_email_before_order_table', 'wc_add_order_notes_to_completed_emails', 10, 4 );
    function wc_add_order_notes_to_completed_emails($order, $sent_to_admin, $plain_text, $email) {
    		if ( $email->id == 'customer_completed_order' ) {  // AS FAR AS I UNDERSTAND THIS LINE TRIGGERS NOTICE
    // some code here
    }
    }
Viewing 1 replies (of 1 total)
  • Plugin Support CartFlows Team

    (@cartflows)

    Hello @titsmaker,

    Thank you for reaching out to us.

    The undefined variable notice is coming from the Woocommerce. We need to check and confirm if this notice showing due to our plugin option. If found any issue we will fix it.

    Regarding second notice you need to check if the variable is object or not.

    Let us know if you have any questions.

Viewing 1 replies (of 1 total)
  • The topic ‘Admin EMail triggers PHP notice’ is closed to new replies.