<?php
/**
 * Email Footer
 *
 * This template can be overridden by copying it to yourtheme/woocommerce/emails/email-footer.php.
 *
 * HOWEVER, on occasion WooCommerce will need to update template files and you
 * (the theme developer) will need to copy the new files to your theme to
 * maintain compatibility. We try to do this as little as possible, but it does
 * happen. When this occurs the version of the template file will be bumped and
 * the readme will list any important changes.
 *
 * @see https://woocommerce.com/document/template-structure/
 * @package WooCommerce\Templates\Emails
 * @version 7.4.0
 */

defined( 'ABSPATH' ) || exit;

$current_language = defined( 'ICL_LANGUAGE_CODE' ) ? ICL_LANGUAGE_CODE : 'en';
?>
																		</div>
																	</td>
																</tr>
															</table>
															<!-- End Content -->
														</td>
													</tr>
												</table>
												<!-- End Body -->
											</td>
										</tr>
									</table>
								</td>
							</tr>
							<tr>
								<td align="center" valign="top">
									<!-- Footer -->
                                    <table style="width: 100%;">
                                        <tbody>
                                        <tr>
                                            <td align="left">
                                                <p class="footer_text">
                                                    <?php echo pll__('You receive this email since you recently made a purchase.', 'woocommerce') ?><br/>
                                                    <?php
                                                    $business_name = 'Nobu Digital B.V.';
                                                    $business_address = 'Amsterdam, the Netherlands';

                                                    if (function_exists('get_field')) {
                                                        $business_name = get_field('business-name', 'option');
                                                        $business_address = get_field('business-address', 'option');
                                                    }

                                                    echo wp_kses_post("$business_name — $business_address");
                                                    ?>
                                                </p>
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                    <table style="width: 100%">
                                        <tbody>
                                        <tr class="footer_row">
                                            <td align="center">
                                                <a class="footer_title" href="<?php echo esc_url( home_url( '/' . $current_language . '/checkout' ) ); ?>">
                                                    <img src="https://fitify.io/shop/wp-content/uploads/2025/03/Logo.png" alt="Fitify" style="height: 30px;">
                                                </a>
                                            </td>
                                            <td align="center">
                                                <?php
                                                $link = false;

                                                if (function_exists('get_field')) {
                                                    /* @var string|false $link */
                                                    $link = get_field('instagram-link', 'option');
                                                }

                                                if ($link !== '' && $link) {
                                                    echo "<a class='instagram_link' href='$link'>" . __('Follow us on Instagram', 'woocommerce') . '</a>';
                                                }
                                                ?>
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
									<!-- End Footer -->
								</td>
							</tr>
						</table>
					</div>
				</td>
				<td><!-- Deliberately empty to support consistent sizing and layout across multiple email clients. --></td>
			</tr>
		</table>
	</body>
</html>
