<?php
/**
 * StoreSheet sync-failure email (HTML).
 *
 * Override by copying to yourtheme/storesheet/emails/storesheet-sync-failure.php.
 *
 * @package StoreSheet
 *
 * @var string    $resource
 * @var int       $resource_id
 * @var string    $error
 * @var string    $email_heading
 * @var \WC_Email $email
 */

defined( 'ABSPATH' ) || exit;

do_action( 'woocommerce_email_header', $email_heading, $email );
?>

<p><?php esc_html_e( 'A StoreSheet sync job failed permanently and was not written to Google Sheets.', 'storesheet' ); ?></p>

<ul>
	<li>
		<strong><?php esc_html_e( 'Item', 'storesheet' ); ?>:</strong>
		<?php echo esc_html( '' !== $resource ? $resource : __( 'item', 'storesheet' ) ); ?>
		<?php echo $resource_id ? '#' . absint( $resource_id ) : ''; ?>
	</li>
	<li><strong><?php esc_html_e( 'Error', 'storesheet' ); ?>:</strong> <?php echo esc_html( $error ); ?></li>
</ul>

<p><?php esc_html_e( 'Open the sync log under StoreSheet → Overview to see the full history and retry if needed.', 'storesheet' ); ?></p>

<?php
do_action( 'woocommerce_email_footer', $email );
