PluginProbe
MainWP Dashboard: Self-hosted WordPress Management for Agencies / 6.2.1
MainWP Dashboard: Self-hosted WordPress Management for Agencies v6.2.1
6.2.3 6.2.2 6.2.1 6.2 6.1.8 6.1.7 6.1.6 6.1.5 6.1.4 6.1.3 6.1.2 6.1.1 6.1 6.0.12 6.0.11 4.6.0.1 5.0 5.0.1 5.0.2 5.0.3 5.0.3.1 5.0.3.2 5.1 5.1.1 5.2 All 156 releases
← All changes | modules/cost-tracker/classes/class-cost-tracker-utility.php +10 -2 5.2 → 6.2.1 View file →
@@ -10,8 +10,13 @@
10 10
11 11 use MainWP\Dashboard\MainWP_Utility;
12 12 use MainWP\Dashboard\MainWP_UI;
13 13
14 +// Exit if accessed directly.
15 +if ( ! defined( 'ABSPATH' ) ) {
16 + exit;
17 +}
18 +
14 19 /**
15 20 * Class Cost_Tracker_Utility
16 21 */
17 22 class Cost_Tracker_Utility {
@@ -170,8 +175,11 @@
170 175 $get_formated_number = ! empty( $params['get_formated_number'] ) ? true : false;
171 176 $get_decimals = ! empty( $params['get_decimals'] ) ? true : false;
172 177
173 178 $currency = static::get_instance()->get_option( 'currency' );
179 + if ( empty( $currency ) ) {
180 + $currency = 'USD';
181 + }
174 182 $settings = static::get_instance()->get_option( 'currency_format' );
175 183
176 184 if ( ! is_array( $settings ) ) {
177 185 $settings = array();
@@ -210,12 +218,12 @@
210 218 case 'right':
211 219 $format = '%2$s%1$s';
212 220 break;
213 221 case 'left_space':
214 - $format = '%1$s %2$s';
222 + $format = '%1$s %2$s';
215 223 break;
216 224 case 'right_space':
217 - $format = '%2$s %1$s';
225 + $format = '%2$s %1$s';
218 226 break;
219 227 default:
220 228 break;
221 229 }