Display product thumbnail in Woocommerce email notifications

You’d better use woocommerce_email_order_items_args filter. It can be done this way: function add_product_thumbnail_to_wc_emails( $args ) { $args[‘show_image’] = true; $args[‘image_size’] = array( 100, 100 ); return $args; } add_filter( ‘woocommerce_email_order_items_args’, ‘add_product_thumbnail_to_wc_emails’ ); The code has to be placed to functions.php

How to get product variation price in woocommerce_checkout_create_order_line_item hook

Ok, i have found the solution: In the object $item i found this: $item->legacy_values[‘variation_id’] which gives me the ID. Also in $item->legacy_values[] array i have the both prices, which i take now: function wpler_add_quantities_to_order_items($item, $cart_item_key, $values, $order) { setlocale(LC_MONETARY, ‘de_DE’); $price1 = doubleval($item->legacy_values[‘price1’]); $price2 = doubleval($item->legacy_values[‘price2’]); $r = $order->get_billing_postcode(); $rabatt = !empty($r)&&is_numeric($r)&&$r>0 ? doubleval($r) : … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)