arm_get_global_currency(); $type = 'failed'; $plan_name = ''; $content = ''; if( isset($_POST['plan_id']) && !empty($_POST['plan_id']) ) { $count_cycle = ''; $planObj = new ARM_Plan(intval($_POST['plan_id'])); $plan_name = esc_html(stripslashes($planObj->name)); if($planObj->options['payment_cycles'] > 0) { $type = 'success'; $typeArrayMany = array( 'D' => __("days", 'ARMember'), 'W' => __("weeks", 'ARMember'), 'M' => __("months", 'ARMember'), 'Y' => __("years", 'ARMember'), ); $typeArray = array( 'D' => __("day", 'ARMember'), 'W' => __("week", 'ARMember'), 'M' => __("month", 'ARMember'), 'Y' => __("year", 'ARMember'), ); $content .= '
| ' . __('Label', 'ARMember') . ' | '; $content .= '' . __('Amount', 'ARMember') . ' | '; $content .= '' . __('Billing Cycle', 'ARMember') . ' | '; $content .= '' . __('Recurring Time', 'ARMember') . ' | '; $content .= '
|---|---|---|---|
| ' . $arm_label . ' | '; $content .= '' . $arm_amount . ' | '; $content .= '' . $arm_billing_text . ' | '; $content .= '' . $arm_recurring_time . ' | '; $content .= '
| ' . __('Plan', 'ARMember') . ' | '; $historyHtml .= '' . __('Type', 'ARMember') . ' | '; $historyHtml .= '' . __('Start Date', 'ARMember') . ' | '; $historyHtml .= '' . __('Expire Date', 'ARMember') . ' | '; $historyHtml .= '' . __('Amount', 'ARMember') . ' | '; $historyHtml .= '' . __('Payment Gateway', 'ARMember') . ' | '; $historyHtml .= '
| ' . $plan_name . ' | '; $historyHtml .= '';
switch ($mh['arm_action']) {
case 'new_subscription':
$historyHtml .= __('New Subscription', 'ARMember');
break;
case 'failed_payment':
$historyHtml .= __('Failed Payment', 'ARMember');
$mh_content['expire'] = strtotime($mh['arm_date_recorded']);
break;
case 'cancel_payment':
case 'cancel_subscription':
$historyHtml .= __('Cancel Subscription', 'ARMember');
$mh_content['expire'] = strtotime($mh['arm_date_recorded']);
break;
case 'eot':
$historyHtml .= __('Expire Subscription', 'ARMember');
/* manual subscription if user expired */
$mh_content['expire'] = ($mh_content['expire']);
break;
case 'change_subscription':
$historyHtml .= __('Change Subscription', 'ARMember');
break;
case 'renew_subscription':
$historyHtml .= __('Renew Subscription', 'ARMember');
break;
case 'recurring_subscription':
$historyHtml .= __('Recurring Payment', 'ARMember');
break;
default:
break;
}
if (isset($mh_content['current_user']) && $mh_content['current_user'] != '0' && $mh_content['current_user'] != $mh['arm_user_id']) {
if (isset($mh_content['action_by']) && $mh_content['action_by'] == 'terminate') {
$historyHtml .= ' (' . __('Admin Terminated Account', 'ARMember') . ') ';
} else {
$historyHtml .= '(' . __('Action By Admin', 'ARMember') . ') ';
}
} else if (isset($mh_content['action_by']) && $mh_content['action_by'] == 'system') {
$historyHtml .= '(' . __('Action by system', 'ARMember') . ') ';
} else if (isset($mh_content['action_by']) && $mh_content['action_by'] == 'close_account') {
$historyHtml .= '(' . __('User Closed Account', 'ARMember') . ') ';
}
$historyHtml .= ' | ';
$startDetail = '-';
if (isset($mh_content['start']) && !empty($mh_content['start'])) {
$startDetail = '';
if (!in_array($mh['arm_item_id'], $user_plans) && !empty($change_plan) && $subscr_effective > strtotime($nowDate)) {
$change_plan_name = $this->arm_get_plan_name_by_id($change_plan);
$startDetail .= "' . $startDetail . ' | '; $historyHtml .= ''; if (isset($mh_content['expire']) && !empty($mh_content['expire'])) { $historyHtml .= date_i18n($date_format, $mh_content['expire']); } else { $historyHtml .= '-'; } $historyHtml .= ' | '; $historyHtml .= ''; if (in_array($mh['arm_action'], array('new_subscription', 'change_subscription', 'renew_subscription', 'recurring_subscription')) && isset($mh_content['plan_text']) && !empty($mh_content['plan_text'])) { $arm_paid_amount = $mh_content['plan_text']; $historyHtml .= apply_filters('arm_change_membership_history_paid_amount', $arm_paid_amount, $mh); } else { $historyHtml .= '-'; } $historyHtml .= ' | '; $historyHtml .= ''; if (isset($mh_content['gateway']) && !empty($mh_content['gateway'])) { $historyHtml .= $arm_payment_gateways->arm_gateway_name_by_key($mh_content['gateway']); } else { $historyHtml .= '-'; } $historyHtml .= ' | '; $historyHtml .= '