<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

/**
 * Plain Text Template: Service Order Delivered Email
 *
 * Sent to the employer when a freelancer delivers the service.
 *
 * @var string   $email_heading
 * @var string   $recipient_name
 * @var string   $freelancer_name
 * @var string   $service_title
 * @var string   $service_link
 * @var string   $service_id
 * @var string   $order_id
 * @var string   $order_link
 * @var string   $freelancer_label
 * @var bool     $sent_to_admin
 * @var bool     $plain_text
 * @var WC_Email $email
 */

echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
echo esc_html( wp_strip_all_tags( $email_heading ) );
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";

/* Greeting */
printf(
	// translators: %s: Recipient name.
	esc_html__( 'Hello %s,', 'gigneo' ),
	esc_html( $recipient_name )
);
echo "\n\n";

/* Introduction */
printf(
	// translators: %s: Freelancer name.
	esc_html__( '%s has successfully delivered your order. Please review the delivery and take any necessary action.', 'gigneo' ),
	esc_html( $freelancer_name )
);
echo "\n\n";

/* Section heading */
echo esc_html__( 'Order details', 'gigneo' );
echo "\n----------\n\n";

/* Order ID */
echo esc_html__( 'Order ID:', 'gigneo' ) . ' ' . esc_html( gigneo_format_id( $order_id, 'order', false ) );
echo "\n";

/* Service ID */
echo esc_html__( 'Service ID:', 'gigneo' ) . ' ' . esc_html( gigneo_format_id( $service_id, 'service', false ) );
echo "\n";

/* Service title */
echo esc_html__( 'Service title:', 'gigneo' ) . ' ' . esc_html( $service_title );
echo "\n";

/* Freelancer label dynamic */
echo esc_html( $freelancer_label ) . ': ' . esc_html( $freelancer_name );
echo "\n\n";

/* CTA link */
echo esc_html__( 'View order:', 'gigneo' ) . ' ' . esc_url( $order_link );
echo "\n\n";

/* Closing note */
echo esc_html__( 'If everything looks good, you can mark the order as complete. If you need revisions, please request them through the order page.', 'gigneo' );
echo "\n\n";


// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
do_action( 'woocommerce_email_footer', $email );
