// přidání relativních produktů do emailu o zpracovávání objednávky add_action( 'woocommerce_email_after_order_table', 'vandaal_add_product_grid_specific_email', 20, 4 ); function vandaal_add_product_grid_specific_email( $order, $sent_to_admin, $plain_text, $email ) { if ( $email->id == 'customer_processing_order' ) { $related = array(); foreach ( $order->get_items() as $item_id => $item ) { $related = array_merge( wc_get_related_products( $item->get_product_id() ), $related ); } if ( ! $related ) return; shuffle( $related ); $related = array_unique( $related ); echo '
';
$html .= $product->get_image();
$html .= '' . $product->get_title() . ''; $html .= '' . $product->get_price_html() . ' '; $html .= ' | ';
$html .= $col % $cols === 0 ? '