31 lines
1.8 KiB
PHP
31 lines
1.8 KiB
PHP
<?php
|
|
/**
|
|
* Email z kuponem
|
|
*/
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
|
|
|
|
<?php do_action( 'woocommerce_email_header', $email_heading, $email ?? '' ); ?>
|
|
|
|
<h2><?php printf( esc_html__( 'Hi %s,', 'flexible-coupons-pro' ), isset( $meta['flexible_coupon_recipient_name'] ) ? $meta['flexible_coupon_recipient_name'] : '' ); ?></h2>
|
|
|
|
<p><b><?php printf( __( 'Thanks to %s you get a gift voucher for use in the <a href="%s">%s</a> store. The coupon is valid to %s.', 'flexible-coupons-pro'), $order->get_billing_first_name() . ' ' . $order->get_billing_last_name(), get_site_url(), get_bloginfo('name'), $meta['coupon_expiry'], $date_order ) ; ?></b></p>
|
|
|
|
<p><a href="<?php echo $meta['coupon_url']; ?>"><?php esc_html_e( 'Download PDF with the coupon »', 'flexible-coupons-pro'); ?></a></p>
|
|
|
|
<h2><?php esc_html_e( 'Coupon information', 'flexible-coupons-pro'); ?></h2>
|
|
<?php if( isset( $meta['coupon_code'] ) ): ?><p><?php printf( esc_html__( 'Coupon code: %s', 'flexible-coupons-pro'), $meta['coupon_code'] ); ?></p><?php endif; ?>
|
|
<?php if( isset( $meta['coupon_value'] ) ): ?><p><?php printf( esc_html__( 'Coupon value: %s', 'flexible-coupons-pro'), $meta['coupon_value'] ); ?></p><?php endif; ?>
|
|
<?php if( ! empty( $meta['coupon_expiry'] ) ): ?>
|
|
<?php if( isset( $meta['coupon_expiry'] ) ): ?><p><?php printf( esc_html__( 'Expiry date: %s', 'flexible-coupons-pro'), $meta['coupon_expiry'] ); ?></p><?php endif; ?>
|
|
<?php endif; ?>
|
|
|
|
<?php if( isset( $meta['flexible_coupon_recipient_message'] ) && ! empty( $meta['flexible_coupon_recipient_message'] ) ): ?>
|
|
<p><?php esc_html_e( 'A message from the buyer:', 'flexible-coupons-pro'); ?></p>
|
|
<p><?php echo $meta['flexible_coupon_recipient_message']; ?></p>
|
|
<?php endif; ?>
|
|
|
|
<p><?php esc_html_e( 'Thanks for reading!', 'flexible-coupons-pro'); ?></p>
|
|
|
|
<?php do_action( 'woocommerce_email_footer' ); ?>
|