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

/**
 * Plain Text Template: Service Order Revision Email
 *
 * Sent to the freelancer when the employer requests a revision.
 *
 * @var string   $email_heading
 * @var string   $profile_name
 * @var string   $employer_name
 * @var string   $service_title
 * @var string   $service_id
 * @var string   $order_id
 * @var string   $order_link
 * @var string   $employer_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: Profile name.
	esc_html__( 'Hello %s,', 'gigneo' ),
	esc_html( $profile_name )
);
echo "\n\n";

/* Introduction */
printf(
	// translators: %s: Employer name.
	esc_html__( '%s has requested a revision for your delivered service order. Please review the feedback and update your delivery as soon as possible.', 'gigneo' ),
	esc_html( $employer_name )
);
echo "\n\n";

/* Section heading */
echo esc_html__( 'Revision 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";

/* Employer label dynamic */
echo esc_html( $employer_label ) . ': ' . esc_html( $employer_name );
echo "\n\n";

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

/* Closing note */
echo esc_html__( 'Timely revisions help maintain high client satisfaction and ensure successful order completion.', 'gigneo' );
echo "\n\n";


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