PluginProbe
Subscriptions for WooCommerce with Stripe Recurring Payments / 1.9.5
Subscriptions for WooCommerce with Stripe Recurring Payments v1.9.5
2.0.0 1.11.2 1.11.1 1.11.0 1.10.9 1.10.8 1.10.7 1.10.6 1.10.5 1.10.4 1.10.3 1.10.2 1.10.1 1.10.0 1.9.6 1.9.5 trunk 1.3.0 1.3.1 1.3.2 1.4.0 1.4.1 1.4.2 1.5.0 1.5.1 All 61 releases
subscription / includes / Illuminate / views / subscription-table.php

subscription-table.php in Subscriptions for WooCommerce with Stripe Recurring Payments 1.9.5, at includes/Illuminate/views/subscription-table.php

109 lines 5.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Related subscriptions for email.
4 *
5 * @var \WC_Order $order Order Object.
6 * @var object[] $histories Order Object.
7 *
8 * @package SpringDevs\Subscription\Illuminate\Email
9 */
10
11 // Exit if accessed directly.
12 if ( ! defined( 'ABSPATH' ) ) {
13 exit;
14 }
15
16 ?>
17
18 <div style="margin-bottom: 40px;">
19 <table class="td" cellspacing="0" cellpadding="6"
20 style="width: 100%; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;"
21 border="1">
22 <tbody>
23 <tr>
24 <h2>
25 <?php
26 esc_html_e( 'Related Subscriptions', 'subscription' );
27 ?>
28 </h2>
29 <?php
30 if ( ! $order->has_status( 'completed' ) ) :
31 ?>
32 <p><small><?php esc_html_e( 'Your subscription will be activated when order status is completed.', 'subscription' ); ?></small></p>
33 <?php endif; ?>
34 </tr>
35 <?php
36 foreach ( $histories as $history ) :
37 $item = $order->get_item( $history->order_item_id );
38 $item_meta = wc_get_order_item_meta( $history->order_item_id, '_subscrpt_meta', true );
39 $subscription_id = $history->subscription_id;
40 $subscription_status_object = get_post_status_object( get_post_status( $subscription_id ) );
41 $cost = get_post_meta( $subscription_id, '_subscrpt_price', true );
42 $has_trial = isset( $item_meta['trial'] ) && strlen( $item_meta['trial'] ) > 2;
43 $start_date = get_post_meta( $subscription_id, '_subscrpt_start_date', true );
44 $next_date = get_post_meta( $subscription_id, '_subscrpt_next_date', true );
45 ?>
46 <tr>
47 <th class="td" scope="row" colspan="3"
48 style="color: #636363; border: 1px solid #e5e5e5; vertical-align: middle; padding: 12px; text-align: center;"><?php echo wp_kses_post( get_the_title( $subscription_id ) ); ?></th>
49 </tr>
50 <tr>
51 <th class="td" scope="row" colspan="2"
52 style="color: #636363; border: 1px solid #e5e5e5; vertical-align: middle; padding: 12px; text-align: left;"><?php esc_html_e( 'Item', 'subscription' ); ?> </th>
53 <th class="td" scope="row" colspan="3"
54 style="color: #636363; border: 1px solid #e5e5e5; vertical-align: middle; padding: 12px; text-align: left;">
55 <a href="<?php echo esc_url( get_permalink( $item->get_product_id() ?? '' ) ); ?>"><?php echo wp_kses_post( $item->get_name() ); ?></a>
56 <strong class="product-quantity">×&nbsp;<?php echo esc_html( $item->get_quantity() ); ?></strong>
57 </th>
58 </tr>
59 <tr>
60 <th class="td" scope="row" colspan="2"
61 style="color: #636363; border: 1px solid #e5e5e5; vertical-align: middle; padding: 12px; text-align: left;"><?php esc_html_e( 'Status', 'subscription' ); ?> </th>
62 <td class="td"
63 style="color: #636363; border: 1px solid #e5e5e5; vertical-align: middle; padding: 12px; text-align: left;"><?php echo esc_html( $subscription_status_object->label ); ?></td>
64 </tr>
65 <tr>
66 <th class="td" scope="row" colspan="2"
67 style="color: #636363; border: 1px solid #e5e5e5; vertical-align: middle; padding: 12px; text-align: left;">
68 <?php esc_html_e( 'Recurring amount', 'subscription' ); ?> </th>
69 <td class="td"
70 style="color: #636363; border: 1px solid #e5e5e5; vertical-align: middle; padding: 12px; text-align: left;"><?php echo wp_kses_post( SpringDevs\Subscription\Illuminate\Helper::format_price_with_order_item( $cost, $item->get_id() ) ); ?></td>
71 </tr>
72 <?php if ( ! $has_trial ) { ?>
73 <tr>
74 <th class="td" scope="row" colspan="2"
75 style="color: #636363; border: 1px solid #e5e5e5; vertical-align: middle; padding: 12px; text-align: left;"><?php esc_html_e( 'Next billing on', 'subscription' ); ?>
76 :
77 </th>
78 <td class="td"
79 style="color: #636363; border: 1px solid #e5e5e5; vertical-align: middle; padding: 12px; text-align: left;"><?php echo ! empty( $next_date ) ? esc_html( wp_date( 'F d, Y', $next_date ) ) : '-'; ?></td>
80 </tr>
81 <?php } else { ?>
82 <tr>
83 <th class="td" scope="row" colspan="2"
84 style="color: #636363; border: 1px solid #e5e5e5; vertical-align: middle; padding: 12px; text-align: left;"><?php esc_html_e( 'Trial', 'subscription' ); ?>
85 :
86 </th>
87 <td class="td"
88 style="color: #636363; border: 1px solid #e5e5e5; vertical-align: middle; padding: 12px; text-align: left;"><?php echo esc_html( $item_meta['trial'] ); ?></td>
89 </tr>
90 <tr>
91 <th class="td" scope="row" colspan="2"
92 style="color: #636363; border: 1px solid #e5e5e5; vertical-align: middle; padding: 12px; text-align: left;"><?php esc_html_e( 'First billing on', 'subscription' ); ?>
93 :
94 </th>
95 <td class="td"
96 style="color: #636363; border: 1px solid #e5e5e5; vertical-align: middle; padding: 12px; text-align: left;"><?php echo ! empty( $start_date ) ? esc_html( wp_date( 'F d, Y', $start_date ) ) : '-'; ?></td>
97 </tr>
98 <?php } ?>
99 <tr>
100 <th class="td" scope="row" colspan="3"
101 style="color: #636363; border: 1px solid #e5e5e5; vertical-align: middle; padding: 12px; text-align: left; padding-bottom: 30px;"></th>
102 </tr>
103 <?php
104 endforeach;
105 ?>
106 </tbody>
107 </table>
108 </div>
109