| @@ -10,8 +10,9 @@ | ||
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | 12 | namespace SpringDevs\Subscription\Admin; |
| 13 | 13 | |
| 14 | +use SpringDevs\Subscription\Illuminate\Helper; | |
| 14 | 15 | use SpringDevs\Subscription\Illuminate\Plans\PlanRepository; |
| 15 | 16 | |
| 16 | 17 | /** |
| 17 | 18 | * Plan presenter. |
| @@ -150,8 +151,9 @@ | ||
| 150 | 151 | 'base_price' => ( $product && ! $is_variable ) ? self::money( (float) $product->get_price() ) : '', |
| 151 | 152 | 'one_time_on' => $product ? ( 'yes' === $product->get_meta( '_subscrpt_one_time_enabled' ) ) : false, |
| 152 | 153 | 'ot_regular' => ( $product && ! $is_variable ) ? self::one_time_price( $product ) : '', |
| 153 | 154 | 'ot_offer' => ( $product && ! $is_variable ) ? (string) $product->get_sale_price() : '', |
| 155 | + 'user_cancel' => $product ? Helper::can_user_cancel( $product->get_meta( '_subscrpt_user_cancel' ) ) : true, | |
| 154 | 156 | 'edit_url' => get_edit_post_link( $oid, 'raw' ), |
| 155 | 157 | 'view_url' => get_permalink( $oid ), |
| 156 | 158 | 'rows' => array(), |
| 157 | 159 | 'variations' => array(), |