get_order_number()) ); echo "\n\n"; echo esc_html__('Order', 'ai-eshop-optimizer') . ': ' . esc_html($order->get_order_number()) . "\n"; echo esc_url($order->get_edit_order_url()) . "\n"; if ($declaration && !empty($declaration->declared_at_gmt)) { echo esc_html__('Submitted on', 'ai-eshop-optimizer') . ': ' . esc_html(wp_date( get_option('date_format') . ', ' . get_option('time_format'), strtotime($declaration->declared_at_gmt . ' UTC') )) . "\n"; } $aieo_is_full = $declaration ? !empty($declaration->is_full) : true; echo esc_html__('Scope', 'ai-eshop-optimizer') . ': ' . esc_html($aieo_is_full ? __('The entire order', 'ai-eshop-optimizer') : __('Selected items only', 'ai-eshop-optimizer')) . "\n"; echo esc_html__('Customer', 'ai-eshop-optimizer') . ': ' . esc_html($order->get_formatted_billing_full_name()); $aieo_mail = (string) $order->get_billing_email(); if ($aieo_mail !== '') { echo ' — ' . esc_html($aieo_mail); } echo "\n"; if (!empty($items)) { echo "\n" . esc_html__('Items covered by this withdrawal', 'ai-eshop-optimizer') . ":\n"; foreach ($items as $aieo_item) { $aieo_taken = isset($aieo_item['withdraw_qty']) ? (int) $aieo_item['withdraw_qty'] : (int) $aieo_item['qty']; $aieo_ordered = (int) $aieo_item['qty']; $aieo_qty_txt = ($aieo_taken < $aieo_ordered) ? sprintf( __('%1$d of %2$d', 'ai-eshop-optimizer'), $aieo_taken, $aieo_ordered ) : sprintf( _n('%d piece', '%d pieces', $aieo_taken, 'ai-eshop-optimizer'), $aieo_taken ); echo '- ' . esc_html($aieo_item['name']) . ' — ' . esc_html($aieo_qty_txt) . "\n"; } } if ($declaration && !empty($declaration->reason_note)) { echo "\n" . esc_html__('Customer note', 'ai-eshop-optimizer') . ': ' . esc_html($declaration->reason_note) . "\n"; } echo "\n" . esc_html__('Open the withdrawal queue', 'ai-eshop-optimizer') . ': ' . esc_url($queue_url) . "\n\n"; echo esc_html__('The declaration is recorded and the customer has already received the statutory acknowledgement. What remains is yours: arrange the return, check the label, and refund once the goods are back.', 'ai-eshop-optimizer') . "\n"; if ($additional_content) { echo "\n" . esc_html(wp_strip_all_tags(wptexturize($additional_content))) . "\n"; } echo "\n" . esc_html(apply_filters('woocommerce_email_footer_text', get_option('woocommerce_email_footer_text'))) . "\n";