Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #576412

    Hi All

    Since updating to the latest version of Enfold / WordPress / WooCommerce last week we have been seeing this error in the automatic emails sent to us and to the customer when they order …

    Notice: Undefined variable: plain_text in /home/xyz/public_html/wp-content/themes/enfold-child/functions.php on line 888

    Notice: Undefined variable: show_download_links in /home/xyz/public_html/wp-content/themes/enfold-child/functions.php on line 892

    Notice: Undefined variable: show_purchase_note in /home/xyz/public_html/wp-content/themes/enfold-child/functions.php on line 894

    Notice: Undefined variable: show_image in /home/xyz/public_html/wp-content/themes/enfold-child/functions.php on line 895

    Notice: Undefined variable: image_size in /home/electri1/public_html/wp-content/themes/enfold-child/functions.php on line 897

    I have checked the lines that this code refers to and it is this ..

    // Edit order items table template defaults
    function sww_add_wc_order_email_images( $table, $order ) {
      
    	ob_start();
    	
    	$template = $plain_text ? 'emails/plain/email-order-items.php' : 'emails/email-order-items.php';
    	wc_get_template( $template, array(
    		'order'                 => $order,
    		'items'                 => $order->get_items(),
    		'show_download_links'   => $show_download_links,
    		'show_sku'              => true,
    		'show_purchase_note'    => $show_purchase_note,
    		'show_image'            => $show_image,
    		'image_size'            => $image_size
    	) );
       
    	return ob_get_clean();
    }
    

    Any help would be appreciated here.

    Thanks

    #576806

    Hey richardelectrix!

    So that’s some code your using in your child theme correct? Where did you find it?

    Not sure what it could be but you could try turning off WordPress debugging to see if that removes the notices.

    Regards,
    Elliott

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.