<th><?php _e('Total Profit', 'makery'); ?> </th> <td><?php echo ThemexWoo::getPrice(ThemexUser::$data['current']['profit']); ?> </td> </tr> <tr> <th><?php _e('Current Balance', 'makery'); ?> </th> <td><?php echo ThemexWoo::getPrice(ThemexUser::$data['current']['balance']); ?> </td> </tr> <?php if (!ThemexCore::checkOption('shop_multiple') && ThemexShop::$data['status'] == 'publish') { ?> <tr> <th><?php _e('Current Rate', 'makery'); ?> </th> <td><?php echo ThemexShop::filterRate(ThemexShop::$data['ID'], ThemexShop::$data['rate']); ?> %</td>
/** * Gets plan price * * @access public * @param int $ID * @return string */ public static function getPlanPrice($ID) { $out = ''; if (ThemexWoo::isActive()) { $product = ThemexCore::getPostRelations($ID, 0, 'plan_product', true); $period = intval(ThemexCore::getPostMeta($ID, 'plan_period', 7)); $converted = themex_time($period * 86400, true); if ($product != 0) { $price = ThemexWoo::getPrice($product); $out = '<span>' . $price['text'] . '</span>'; if ($period != 0 && strpos($price['type'], 'subscription') === false) { $out .= ' / ' . $converted; } } } return $out; }
/** * Renders withdrawal options * * @access public * @param int $ID * @return string */ public static function renderWithdrawal($ID) { $out = ''; $author = self::getAuthor($ID); $withdrawal = self::getWithdrawal($ID); $nickname = get_user_meta($author, 'nickname', true); $fields['author'] = array('label' => __('Author', 'makery'), 'value' => '<a href="' . get_edit_user_link($author) . '">' . $nickname . '</a>'); $fields['date'] = array('label' => __('Date', 'makery'), 'value' => date('Y/m/d', strtotime($withdrawal['date']))); $fields['amount'] = array('label' => __('Amount', 'makery'), 'value' => ThemexWoo::getPrice($withdrawal['amount'])); $fields['method'] = array('label' => __('Method', 'makery'), 'value' => $withdrawal['method']['label']); if (isset(ThemexCore::$components['forms']['withdrawal'][$withdrawal['method']['name']])) { foreach (ThemexCore::$components['forms']['withdrawal'][$withdrawal['method']['name']] as $field) { $fields[$field['name']] = array('label' => $field['label'], 'value' => $withdrawal[$field['name']]); } } foreach ($fields as $field) { $out .= '<tr><th><h4 class="themex-meta-title">' . $field['label'] . '</h4></th><td class="themex-meta-value">' . $field['value'] . '</td></tr>'; } return $out; }