| 1 |
<?php |
| 2 |
/** |
| 3 |
* Customer "subscription completed" email (HTML) — the renewal limit was |
| 4 |
* reached and no further payments will be charged. |
| 5 |
* |
| 6 |
* Override by copying it to yourtheme/better-payment/emails/bp-subscription-completed.php. |
| 7 |
* |
| 8 |
* @var \WC_Order $order Parent (subscription) order. |
| 9 |
* @var string[] $item_names Subscription line-item names. |
| 10 |
* @var string $schedule Human billing schedule ("month", "every 3 months") or ''. |
| 11 |
* @var string $view_url Customer URL for the subscription, or ''. |
| 12 |
* @var string $email_heading Email heading. |
| 13 |
* @var string $additional_content Shop-owner closing copy. |
| 14 |
* @var bool $sent_to_admin |
| 15 |
* @var bool $plain_text |
| 16 |
* @var \Better_Payment\Lite\WooCommerce\Emails\SubscriptionEmail $email |
| 17 |
* |
| 18 |
* @package Better_Payment\Lite |
| 19 |
* @since 2.4.0 |
| 20 |
*/ |
| 21 |
|
| 22 |
if ( ! defined( 'ABSPATH' ) ) { |
| 23 |
exit; |
| 24 |
} |
| 25 |
|
| 26 |
do_action( 'woocommerce_email_header', $email_heading, $email ); ?> |
| 27 |
|
| 28 |
<p> |
| 29 |
<?php |
| 30 |
/* translators: %s: customer first name */ |
| 31 |
printf( esc_html__( 'Hi %s,', 'better-payment' ), esc_html( $order->get_billing_first_name() ) ); |
| 32 |
?> |
| 33 |
</p> |
| 34 |
|
| 35 |
<p> |
| 36 |
<?php |
| 37 |
printf( |
| 38 |
/* translators: 1: order number, 2: site title */ |
| 39 |
esc_html__( 'Your subscription (order %1$s) on %2$s is complete — it reached its planned number of renewals, and no further payments will be charged.', 'better-payment' ), |
| 40 |
esc_html( '#' . $order->get_order_number() ), |
| 41 |
esc_html( wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ) |
| 42 |
); |
| 43 |
?> |
| 44 |
</p> |
| 45 |
|
| 46 |
<?php if ( ! empty( $item_names ) ) : ?> |
| 47 |
<p> |
| 48 |
<?php |
| 49 |
printf( |
| 50 |
/* translators: %s: comma-separated subscription product names */ |
| 51 |
esc_html__( 'Subscription: %s', 'better-payment' ), |
| 52 |
esc_html( implode( ', ', $item_names ) ) |
| 53 |
); |
| 54 |
?> |
| 55 |
<?php if ( '' !== $schedule ) : ?> |
| 56 |
<br /> |
| 57 |
<?php |
| 58 |
printf( |
| 59 |
/* translators: %s: billing schedule, e.g. "month" or "every 3 months" */ |
| 60 |
esc_html__( 'Billing schedule: %s', 'better-payment' ), |
| 61 |
esc_html( $schedule ) |
| 62 |
); |
| 63 |
?> |
| 64 |
<?php endif; ?> |
| 65 |
</p> |
| 66 |
<?php endif; ?> |
| 67 |
|
| 68 |
<?php if ( '' !== $view_url ) : ?> |
| 69 |
<p> |
| 70 |
<a href="<?php echo esc_url( $view_url ); ?>"><?php esc_html_e( 'View your subscription', 'better-payment' ); ?></a> |
| 71 |
</p> |
| 72 |
<?php endif; ?> |
| 73 |
|
| 74 |
<?php |
| 75 |
if ( $additional_content ) { |
| 76 |
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) ); |
| 77 |
} |
| 78 |
|
| 79 |
do_action( 'woocommerce_email_footer', $email ); |
| 80 |
|