<?php
/**
 * StoreSheet sync-failure email (plain text).
 *
 * Override by copying to yourtheme/storesheet/emails/plain/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;

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

esc_html_e( 'A StoreSheet sync job failed permanently and was not written to Google Sheets.', 'storesheet' );
echo "\n\n";

/* translators: 1: resource type, 2: resource ID */
printf( esc_html__( 'Item: %1$s #%2$d', 'storesheet' ), esc_html( '' !== $resource ? $resource : __( 'item', 'storesheet' ) ), absint( $resource_id ) );
echo "\n";

/* translators: %s: error message */
printf( esc_html__( 'Error: %s', 'storesheet' ), esc_html( $error ) );
echo "\n\n";

esc_html_e( 'Open the sync log under StoreSheet → Overview to see the full history and retry if needed.', 'storesheet' );
echo "\n\n----------------------------------------\n\n";

echo esc_html( wp_strip_all_tags( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) ) );
