PluginProbe
Subscriptions for WooCommerce with Stripe Recurring Payments / 1.3.1
Subscriptions for WooCommerce with Stripe Recurring Payments v1.3.1
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 / Admin / views / related-subscriptions.php

related-subscriptions.php in Subscriptions for WooCommerce with Stripe Recurring Payments 1.3.1, at includes/Admin/views/related-subscriptions.php

42 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <table class="widefat striped">
2 <thead>
3 <tr>
4 <th></th>
5 <th><?php
6
7 use SpringDevs\Subscription\Illuminate\Helper;
8
9 esc_html_e( 'Started on', 'sdevs_subscrpt' ); ?></th>
10 <th><?php esc_html_e( 'Recurring', 'sdevs_subscrpt' ); ?></th>
11 <th><?php esc_html_e( 'Expiry date', 'sdevs_subscrpt' ); ?></th>
12 <th><?php esc_html_e( 'Status', 'sdevs_subscrpt' ); ?></th>
13 </tr>
14 </thead>
15 <tbody>
16 <?php
17 foreach ( $histories as $history ) :
18 $order_item_id = get_post_meta( $history->subscription_id, '_subscrpt_order_item_id', true );
19 $order_item = $order->get_item( $history->order_item_id );
20 $price = get_post_meta( $history->subscription_id, '_subscrpt_price', true );
21 $trial = get_post_meta( $history->subscription_id, '_subscrpt_trial', true );
22 $start_date = get_post_meta( $history->subscription_id, '_subscrpt_start_date', true );
23 $next_date = get_post_meta( $history->subscription_id, '_subscrpt_next_date', true );
24 $status_object = get_post_status_object( get_post_status( $history->subscription_id ) );
25 ?>
26 <tr>
27 <td>
28 <a href="<?php echo esc_html( get_edit_post_link( $history->subscription_id ) ); ?>" target="_blank">#<?php echo esc_html( $history->subscription_id ); ?> - <?php echo esc_html( $order_item->get_name() ); ?></a>
29 </td>
30 <td>
31 <?php echo null == $trial ? ( ! empty( $start_date ) ? esc_html( gmdate( 'F d, Y', $start_date ) ) : '-' ) : '+' . esc_html( $trial ) . ' ' . __( 'free trial', 'sdevs_subscrpt' ); ?>
32 </td>
33 <td><?php echo wp_kses_post( Helper::format_price_with_order_item( $price, $order_item->get_id() ) ); ?></td>
34 <td><?php echo esc_html( ! empty( $start_date ) && ! empty( $next_date ) ? ( $trial == null ? gmdate( 'F d, Y', $next_date ) : gmdate( 'F d, Y', $start_date ) ) : '-' ); ?></td>
35 <td><span class="subscrpt-<?php echo esc_attr( $status_object->name ); ?>"><?php echo esc_html( $status_object->label ); ?></span></td>
36 </tr>
37 <?php
38 endforeach;
39 ?>
40 </tbody>
41 </table>
42