Admin EMail triggers PHP notice
-
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)
Viewing 1 replies (of 1 total)
- The topic ‘Admin EMail triggers PHP notice’ is closed to new replies.