@@ -1,39 +1,39 @@ |
||
1 | 1 | <?php |
2 | 2 | // MUST have WordPress. |
3 | -if ( !defined( 'WPINC' ) ) { |
|
4 | - exit( 'Do NOT access this file directly: ' . basename( __FILE__ ) ); |
|
3 | +if (!defined('WPINC')) { |
|
4 | + exit('Do NOT access this file directly: ' . basename(__FILE__)); |
|
5 | 5 | } |
6 | 6 | |
7 | 7 | class WPInv_Meta_Box_Notes { |
8 | - public static function output( $post ) { |
|
8 | + public static function output($post) { |
|
9 | 9 | global $post; |
10 | 10 | |
11 | - $notes = wpinv_get_invoice_notes( $post->ID ); |
|
11 | + $notes = wpinv_get_invoice_notes($post->ID); |
|
12 | 12 | |
13 | 13 | echo '<ul class="invoice_notes">'; |
14 | 14 | |
15 | - if ( $notes ) { |
|
16 | - foreach( $notes as $note ) { |
|
17 | - wpinv_get_invoice_note_line_item( $note ); |
|
15 | + if ($notes) { |
|
16 | + foreach ($notes as $note) { |
|
17 | + wpinv_get_invoice_note_line_item($note); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | } else { |
21 | - echo '<li>' . __( 'There are no notes yet.', 'invoicing' ) . '</li>'; |
|
21 | + echo '<li>' . __('There are no notes yet.', 'invoicing') . '</li>'; |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | echo '</ul>'; |
25 | 25 | ?> |
26 | 26 | <div class="add_note"> |
27 | - <h4><?php _e( 'Add note', 'invoicing' ); ?></h4> |
|
27 | + <h4><?php _e('Add note', 'invoicing'); ?></h4> |
|
28 | 28 | <p> |
29 | 29 | <textarea type="text" name="invoice_note" id="add_invoice_note" class="input-text" cols="20" rows="5"></textarea> |
30 | 30 | </p> |
31 | 31 | <p> |
32 | 32 | <select name="invoice_note_type" id="invoice_note_type" class="regular-text"> |
33 | - <option value=""><?php _e( 'Private note', 'invoicing' ); ?></option> |
|
34 | - <option value="customer"><?php _e( 'Note to customer', 'invoicing' ); ?></option> |
|
33 | + <option value=""><?php _e('Private note', 'invoicing'); ?></option> |
|
34 | + <option value="customer"><?php _e('Note to customer', 'invoicing'); ?></option> |
|
35 | 35 | </select> |
36 | - <a href="#" class="add_note button"><?php _e( 'Add', 'invoicing' ); ?></a> <span class="description"><?php _e( 'Add a note for your reference, or add a customer note (the user will be notified).', 'invoicing' ); ?></span> |
|
36 | + <a href="#" class="add_note button"><?php _e('Add', 'invoicing'); ?></a> <span class="description"><?php _e('Add a note for your reference, or add a customer note (the user will be notified).', 'invoicing'); ?></span> |
|
37 | 37 | </p> |
38 | 38 | </div> |
39 | 39 | <?php |
@@ -7,26 +7,26 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | ?> |
13 | 13 | |
14 | - <?php do_action( 'getpaid_before_invoice_details_main', $invoice ); ?> |
|
14 | + <?php do_action('getpaid_before_invoice_details_main', $invoice); ?> |
|
15 | 15 | |
16 | 16 | <div class="getpaid-invoice-details mt-3 mb-3"> |
17 | 17 | <div class="row"> |
18 | 18 | |
19 | 19 | <div class="col-12 col-sm-6"> |
20 | - <?php do_action( 'getpaid_invoice_details_left', $invoice ); ?> |
|
20 | + <?php do_action('getpaid_invoice_details_left', $invoice); ?> |
|
21 | 21 | </div> |
22 | 22 | |
23 | 23 | <div class="col-12 col-sm-6"> |
24 | - <?php do_action( 'getpaid_invoice_details_right', $invoice ); ?> |
|
24 | + <?php do_action('getpaid_invoice_details_right', $invoice); ?> |
|
25 | 25 | </div> |
26 | 26 | |
27 | 27 | </div> |
28 | 28 | </div> |
29 | 29 | |
30 | - <?php do_action( 'getpaid_after_invoice_details_main', $invoice ); ?> |
|
30 | + <?php do_action('getpaid_after_invoice_details_main', $invoice); ?> |
|
31 | 31 | |
32 | 32 | <?php |
@@ -6,7 +6,7 @@ |
||
6 | 6 | * @package Invoicing/data |
7 | 7 | */ |
8 | 8 | |
9 | -defined( 'ABSPATH' ) || exit; |
|
9 | +defined('ABSPATH') || exit; |
|
10 | 10 | |
11 | 11 | return array( |
12 | 12 | "AD" => "AD\d{3}", |
@@ -44,15 +44,15 @@ |
||
44 | 44 | parent::__construct( $options ); |
45 | 45 | } |
46 | 46 | |
47 | - /** |
|
48 | - * The Super block output function. |
|
49 | - * |
|
50 | - * @param array $args |
|
51 | - * @param array $widget_args |
|
52 | - * @param string $content |
|
53 | - * |
|
54 | - * @return mixed|string|bool |
|
55 | - */ |
|
47 | + /** |
|
48 | + * The Super block output function. |
|
49 | + * |
|
50 | + * @param array $args |
|
51 | + * @param array $widget_args |
|
52 | + * @param string $content |
|
53 | + * |
|
54 | + * @return mixed|string|bool |
|
55 | + */ |
|
56 | 56 | public function output( $args = array(), $widget_args = array(), $content = '' ) { |
57 | 57 | return getpaid_invoice_history(); |
58 | 58 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) { |
|
2 | +if (!defined('ABSPATH')) { |
|
3 | 3 | exit; |
4 | 4 | } |
5 | 5 | |
@@ -22,15 +22,15 @@ discard block |
||
22 | 22 | 'block-keywords'=> "['invoicing','history']", |
23 | 23 | 'class_name' => __CLASS__, |
24 | 24 | 'base_id' => 'wpinv_history', |
25 | - 'name' => __('GetPaid > Invoice History','invoicing'), |
|
25 | + 'name' => __('GetPaid > Invoice History', 'invoicing'), |
|
26 | 26 | 'widget_ops' => array( |
27 | 27 | 'classname' => 'wpinv-history-class bsui', |
28 | - 'description' => esc_html__('Displays invoice history.','invoicing'), |
|
28 | + 'description' => esc_html__('Displays invoice history.', 'invoicing'), |
|
29 | 29 | ), |
30 | 30 | 'arguments' => array( |
31 | 31 | 'title' => array( |
32 | - 'title' => __( 'Widget title', 'invoicing' ), |
|
33 | - 'desc' => __( 'Enter widget title.', 'invoicing' ), |
|
32 | + 'title' => __('Widget title', 'invoicing'), |
|
33 | + 'desc' => __('Enter widget title.', 'invoicing'), |
|
34 | 34 | 'type' => 'text', |
35 | 35 | 'desc_tip' => true, |
36 | 36 | 'default' => '', |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | ); |
42 | 42 | |
43 | 43 | |
44 | - parent::__construct( $options ); |
|
44 | + parent::__construct($options); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * |
54 | 54 | * @return mixed|string|bool |
55 | 55 | */ |
56 | - public function output( $args = array(), $widget_args = array(), $content = '' ) { |
|
56 | + public function output($args = array(), $widget_args = array(), $content = '') { |
|
57 | 57 | return getpaid_invoice_history(); |
58 | 58 | } |
59 | 59 |
@@ -44,15 +44,15 @@ |
||
44 | 44 | parent::__construct( $options ); |
45 | 45 | } |
46 | 46 | |
47 | - /** |
|
48 | - * The Super block output function. |
|
49 | - * |
|
50 | - * @param array $args |
|
51 | - * @param array $widget_args |
|
52 | - * @param string $content |
|
53 | - * |
|
54 | - * @return mixed|string|bool |
|
55 | - */ |
|
47 | + /** |
|
48 | + * The Super block output function. |
|
49 | + * |
|
50 | + * @param array $args |
|
51 | + * @param array $widget_args |
|
52 | + * @param string $content |
|
53 | + * |
|
54 | + * @return mixed|string|bool |
|
55 | + */ |
|
56 | 56 | public function output( $args = array(), $widget_args = array(), $content = '' ) { |
57 | 57 | return wpinv_payment_receipt(); |
58 | 58 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) { |
|
2 | +if (!defined('ABSPATH')) { |
|
3 | 3 | exit; |
4 | 4 | } |
5 | 5 | |
@@ -22,15 +22,15 @@ discard block |
||
22 | 22 | 'block-keywords'=> "['invoicing','receipt']", |
23 | 23 | 'class_name' => __CLASS__, |
24 | 24 | 'base_id' => 'wpinv_receipt', |
25 | - 'name' => __('GetPaid > Invoice Receipt','invoicing'), |
|
25 | + 'name' => __('GetPaid > Invoice Receipt', 'invoicing'), |
|
26 | 26 | 'widget_ops' => array( |
27 | 27 | 'classname' => 'wpinv-receipt-class bsui', |
28 | - 'description' => esc_html__('Displays invoice receipt after checkout.','invoicing'), |
|
28 | + 'description' => esc_html__('Displays invoice receipt after checkout.', 'invoicing'), |
|
29 | 29 | ), |
30 | 30 | 'arguments' => array( |
31 | 31 | 'title' => array( |
32 | - 'title' => __( 'Widget title', 'invoicing' ), |
|
33 | - 'desc' => __( 'Enter widget title.', 'invoicing' ), |
|
32 | + 'title' => __('Widget title', 'invoicing'), |
|
33 | + 'desc' => __('Enter widget title.', 'invoicing'), |
|
34 | 34 | 'type' => 'text', |
35 | 35 | 'desc_tip' => true, |
36 | 36 | 'default' => '', |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | ); |
42 | 42 | |
43 | 43 | |
44 | - parent::__construct( $options ); |
|
44 | + parent::__construct($options); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * |
54 | 54 | * @return mixed|string|bool |
55 | 55 | */ |
56 | - public function output( $args = array(), $widget_args = array(), $content = '' ) { |
|
56 | + public function output($args = array(), $widget_args = array(), $content = '') { |
|
57 | 57 | return wpinv_payment_receipt(); |
58 | 58 | } |
59 | 59 |
@@ -11,166 +11,166 @@ |
||
11 | 11 | defined( 'ABSPATH' ) || exit; |
12 | 12 | |
13 | 13 | return array( |
14 | - 'AED' => 'د.إ', |
|
15 | - 'AFN' => '؋', |
|
16 | - 'ALL' => 'L', |
|
17 | - 'AMD' => 'AMD', |
|
18 | - 'ANG' => 'ƒ', |
|
19 | - 'AOA' => 'Kz', |
|
20 | - 'ARS' => '$', |
|
21 | - 'AUD' => '$', |
|
22 | - 'AWG' => 'ƒ', |
|
23 | - 'AZN' => 'AZN', |
|
24 | - 'BAM' => 'KM', |
|
25 | - 'BBD' => '$', |
|
26 | - 'BDT' => '৳', |
|
27 | - 'BGN' => 'лв.', |
|
28 | - 'BHD' => '.د.ب', |
|
29 | - 'BIF' => 'Fr', |
|
30 | - 'BMD' => '$', |
|
31 | - 'BND' => '$', |
|
32 | - 'BOB' => 'Bs.', |
|
33 | - 'BRL' => 'R$', |
|
34 | - 'BSD' => '$', |
|
35 | - 'BTC' => '฿', |
|
36 | - 'BTN' => 'Nu.', |
|
37 | - 'BWP' => 'P', |
|
38 | - 'BYN' => 'Br', |
|
39 | - 'BZD' => '$', |
|
40 | - 'CAD' => '$', |
|
41 | - 'CDF' => 'Fr', |
|
42 | - 'CHF' => 'CHF', |
|
43 | - 'CLP' => '$', |
|
44 | - 'CNY' => '¥', |
|
45 | - 'COP' => '$', |
|
46 | - 'CRC' => '₡', |
|
47 | - 'CUC' => '$', |
|
48 | - 'CUP' => '$', |
|
49 | - 'CVE' => '$', |
|
50 | - 'CZK' => 'Kč', |
|
51 | - 'DJF' => 'Fr', |
|
52 | - 'DKK' => 'DKK', |
|
53 | - 'DOP' => 'RD$', |
|
54 | - 'DZD' => 'د.ج', |
|
55 | - 'EGP' => 'EGP', |
|
56 | - 'ERN' => 'Nfk', |
|
57 | - 'ETB' => 'Br', |
|
58 | - 'EUR' => '€', |
|
59 | - 'FJD' => '$', |
|
60 | - 'FKP' => '£', |
|
61 | - 'GBP' => '£', |
|
62 | - 'GEL' => 'ლ', |
|
63 | - 'GGP' => '£', |
|
64 | - 'GHS' => '₵', |
|
65 | - 'GIP' => '£', |
|
66 | - 'GMD' => 'D', |
|
67 | - 'GNF' => 'Fr', |
|
68 | - 'GTQ' => 'Q', |
|
69 | - 'GYD' => '$', |
|
70 | - 'HKD' => '$', |
|
71 | - 'HNL' => 'L', |
|
72 | - 'HRK' => 'Kn', |
|
73 | - 'HTG' => 'G', |
|
74 | - 'HUF' => 'Ft', |
|
75 | - 'IDR' => 'Rp', |
|
76 | - 'ILS' => '₪', |
|
77 | - 'IMP' => '£', |
|
78 | - 'INR' => '₹', |
|
79 | - 'IQD' => 'ع.د', |
|
80 | - 'IRR' => '﷼', |
|
81 | - 'IRT' => 'تومان', |
|
82 | - 'ISK' => 'kr.', |
|
83 | - 'JEP' => '£', |
|
84 | - 'JMD' => '$', |
|
85 | - 'JOD' => 'د.ا', |
|
86 | - 'JPY' => '¥', |
|
87 | - 'KES' => 'KSh', |
|
88 | - 'KGS' => 'сом', |
|
89 | - 'KHR' => '៛', |
|
90 | - 'KMF' => 'Fr', |
|
91 | - 'KPW' => '₩', |
|
92 | - 'KRW' => '₩', |
|
93 | - 'KWD' => 'د.ك', |
|
94 | - 'KYD' => '$', |
|
95 | - 'KZT' => 'KZT', |
|
96 | - 'LAK' => '₭', |
|
97 | - 'LBP' => 'ل.ل', |
|
98 | - 'LKR' => 'රු', |
|
99 | - 'LRD' => '$', |
|
100 | - 'LSL' => 'L', |
|
101 | - 'LYD' => 'ل.د', |
|
102 | - 'MAD' => 'د.م.', |
|
103 | - 'MDL' => 'MDL', |
|
104 | - 'MGA' => 'Ar', |
|
105 | - 'MKD' => 'ден', |
|
106 | - 'MMK' => 'Ks', |
|
107 | - 'MNT' => '₮', |
|
108 | - 'MOP' => 'P', |
|
109 | - 'MRO' => 'UM', |
|
110 | - 'MUR' => '₨', |
|
111 | - 'MVR' => '.ރ', |
|
112 | - 'MWK' => 'MK', |
|
113 | - 'MXN' => '$', |
|
114 | - 'MYR' => 'RM', |
|
115 | - 'MZN' => 'MT', |
|
116 | - 'NAD' => '$', |
|
117 | - 'NGN' => '₦', |
|
118 | - 'NIO' => 'C$', |
|
119 | - 'NOK' => 'kr', |
|
120 | - 'NPR' => '₨', |
|
121 | - 'NZD' => '$', |
|
122 | - 'OMR' => 'ر.ع.', |
|
123 | - 'PAB' => 'B/.', |
|
124 | - 'PEN' => 'S/.', |
|
125 | - 'PGK' => 'K', |
|
126 | - 'PHP' => '₱', |
|
127 | - 'PKR' => '₨', |
|
128 | - 'PLN' => 'zł', |
|
129 | - 'PRB' => 'р.', |
|
130 | - 'PYG' => '₲', |
|
131 | - 'QAR' => 'ر.ق', |
|
132 | - 'RMB' => '¥', |
|
133 | - 'RON' => 'lei', |
|
134 | - 'RSD' => 'дин.', |
|
135 | - 'RUB' => '₽', |
|
136 | - 'RWF' => 'Fr', |
|
137 | - 'SAR' => 'ر.س', |
|
138 | - 'SBD' => '$', |
|
139 | - 'SCR' => '₨', |
|
140 | - 'SDG' => 'ج.س.', |
|
141 | - 'SEK' => 'kr', |
|
142 | - 'SGD' => '$', |
|
143 | - 'SHP' => '£', |
|
144 | - 'SLL' => 'Le', |
|
145 | - 'SOS' => 'Sh', |
|
146 | - 'SRD' => '$', |
|
147 | - 'SSP' => '£', |
|
148 | - 'STD' => 'Db', |
|
149 | - 'SYP' => 'ل.س', |
|
150 | - 'SZL' => 'L', |
|
151 | - 'THB' => '฿', |
|
152 | - 'TJS' => 'ЅМ', |
|
153 | - 'TMT' => 'm', |
|
154 | - 'TND' => 'د.ت', |
|
155 | - 'TOP' => 'T$', |
|
156 | - 'TRY' => '₺', |
|
157 | - 'TTD' => '$', |
|
158 | - 'TWD' => 'NT$', |
|
159 | - 'TZS' => 'Sh', |
|
160 | - 'UAH' => '₴', |
|
161 | - 'UGX' => 'UGX', |
|
162 | - 'USD' => '$', |
|
163 | - 'UYU' => '$', |
|
164 | - 'UZS' => 'UZS', |
|
165 | - 'VEF' => 'Bs.', |
|
166 | - 'VND' => '₫', |
|
167 | - 'VUV' => 'Vt', |
|
168 | - 'WST' => 'T', |
|
169 | - 'XAF' => 'Fr', |
|
170 | - 'XCD' => '$', |
|
171 | - 'XOF' => 'Fr', |
|
172 | - 'XPF' => 'Fr', |
|
173 | - 'YER' => '﷼', |
|
174 | - 'ZAR' => 'R', |
|
175 | - 'ZMW' => 'ZK', |
|
14 | + 'AED' => 'د.إ', |
|
15 | + 'AFN' => '؋', |
|
16 | + 'ALL' => 'L', |
|
17 | + 'AMD' => 'AMD', |
|
18 | + 'ANG' => 'ƒ', |
|
19 | + 'AOA' => 'Kz', |
|
20 | + 'ARS' => '$', |
|
21 | + 'AUD' => '$', |
|
22 | + 'AWG' => 'ƒ', |
|
23 | + 'AZN' => 'AZN', |
|
24 | + 'BAM' => 'KM', |
|
25 | + 'BBD' => '$', |
|
26 | + 'BDT' => '৳', |
|
27 | + 'BGN' => 'лв.', |
|
28 | + 'BHD' => '.د.ب', |
|
29 | + 'BIF' => 'Fr', |
|
30 | + 'BMD' => '$', |
|
31 | + 'BND' => '$', |
|
32 | + 'BOB' => 'Bs.', |
|
33 | + 'BRL' => 'R$', |
|
34 | + 'BSD' => '$', |
|
35 | + 'BTC' => '฿', |
|
36 | + 'BTN' => 'Nu.', |
|
37 | + 'BWP' => 'P', |
|
38 | + 'BYN' => 'Br', |
|
39 | + 'BZD' => '$', |
|
40 | + 'CAD' => '$', |
|
41 | + 'CDF' => 'Fr', |
|
42 | + 'CHF' => 'CHF', |
|
43 | + 'CLP' => '$', |
|
44 | + 'CNY' => '¥', |
|
45 | + 'COP' => '$', |
|
46 | + 'CRC' => '₡', |
|
47 | + 'CUC' => '$', |
|
48 | + 'CUP' => '$', |
|
49 | + 'CVE' => '$', |
|
50 | + 'CZK' => 'Kč', |
|
51 | + 'DJF' => 'Fr', |
|
52 | + 'DKK' => 'DKK', |
|
53 | + 'DOP' => 'RD$', |
|
54 | + 'DZD' => 'د.ج', |
|
55 | + 'EGP' => 'EGP', |
|
56 | + 'ERN' => 'Nfk', |
|
57 | + 'ETB' => 'Br', |
|
58 | + 'EUR' => '€', |
|
59 | + 'FJD' => '$', |
|
60 | + 'FKP' => '£', |
|
61 | + 'GBP' => '£', |
|
62 | + 'GEL' => 'ლ', |
|
63 | + 'GGP' => '£', |
|
64 | + 'GHS' => '₵', |
|
65 | + 'GIP' => '£', |
|
66 | + 'GMD' => 'D', |
|
67 | + 'GNF' => 'Fr', |
|
68 | + 'GTQ' => 'Q', |
|
69 | + 'GYD' => '$', |
|
70 | + 'HKD' => '$', |
|
71 | + 'HNL' => 'L', |
|
72 | + 'HRK' => 'Kn', |
|
73 | + 'HTG' => 'G', |
|
74 | + 'HUF' => 'Ft', |
|
75 | + 'IDR' => 'Rp', |
|
76 | + 'ILS' => '₪', |
|
77 | + 'IMP' => '£', |
|
78 | + 'INR' => '₹', |
|
79 | + 'IQD' => 'ع.د', |
|
80 | + 'IRR' => '﷼', |
|
81 | + 'IRT' => 'تومان', |
|
82 | + 'ISK' => 'kr.', |
|
83 | + 'JEP' => '£', |
|
84 | + 'JMD' => '$', |
|
85 | + 'JOD' => 'د.ا', |
|
86 | + 'JPY' => '¥', |
|
87 | + 'KES' => 'KSh', |
|
88 | + 'KGS' => 'сом', |
|
89 | + 'KHR' => '៛', |
|
90 | + 'KMF' => 'Fr', |
|
91 | + 'KPW' => '₩', |
|
92 | + 'KRW' => '₩', |
|
93 | + 'KWD' => 'د.ك', |
|
94 | + 'KYD' => '$', |
|
95 | + 'KZT' => 'KZT', |
|
96 | + 'LAK' => '₭', |
|
97 | + 'LBP' => 'ل.ل', |
|
98 | + 'LKR' => 'රු', |
|
99 | + 'LRD' => '$', |
|
100 | + 'LSL' => 'L', |
|
101 | + 'LYD' => 'ل.د', |
|
102 | + 'MAD' => 'د.م.', |
|
103 | + 'MDL' => 'MDL', |
|
104 | + 'MGA' => 'Ar', |
|
105 | + 'MKD' => 'ден', |
|
106 | + 'MMK' => 'Ks', |
|
107 | + 'MNT' => '₮', |
|
108 | + 'MOP' => 'P', |
|
109 | + 'MRO' => 'UM', |
|
110 | + 'MUR' => '₨', |
|
111 | + 'MVR' => '.ރ', |
|
112 | + 'MWK' => 'MK', |
|
113 | + 'MXN' => '$', |
|
114 | + 'MYR' => 'RM', |
|
115 | + 'MZN' => 'MT', |
|
116 | + 'NAD' => '$', |
|
117 | + 'NGN' => '₦', |
|
118 | + 'NIO' => 'C$', |
|
119 | + 'NOK' => 'kr', |
|
120 | + 'NPR' => '₨', |
|
121 | + 'NZD' => '$', |
|
122 | + 'OMR' => 'ر.ع.', |
|
123 | + 'PAB' => 'B/.', |
|
124 | + 'PEN' => 'S/.', |
|
125 | + 'PGK' => 'K', |
|
126 | + 'PHP' => '₱', |
|
127 | + 'PKR' => '₨', |
|
128 | + 'PLN' => 'zł', |
|
129 | + 'PRB' => 'р.', |
|
130 | + 'PYG' => '₲', |
|
131 | + 'QAR' => 'ر.ق', |
|
132 | + 'RMB' => '¥', |
|
133 | + 'RON' => 'lei', |
|
134 | + 'RSD' => 'дин.', |
|
135 | + 'RUB' => '₽', |
|
136 | + 'RWF' => 'Fr', |
|
137 | + 'SAR' => 'ر.س', |
|
138 | + 'SBD' => '$', |
|
139 | + 'SCR' => '₨', |
|
140 | + 'SDG' => 'ج.س.', |
|
141 | + 'SEK' => 'kr', |
|
142 | + 'SGD' => '$', |
|
143 | + 'SHP' => '£', |
|
144 | + 'SLL' => 'Le', |
|
145 | + 'SOS' => 'Sh', |
|
146 | + 'SRD' => '$', |
|
147 | + 'SSP' => '£', |
|
148 | + 'STD' => 'Db', |
|
149 | + 'SYP' => 'ل.س', |
|
150 | + 'SZL' => 'L', |
|
151 | + 'THB' => '฿', |
|
152 | + 'TJS' => 'ЅМ', |
|
153 | + 'TMT' => 'm', |
|
154 | + 'TND' => 'د.ت', |
|
155 | + 'TOP' => 'T$', |
|
156 | + 'TRY' => '₺', |
|
157 | + 'TTD' => '$', |
|
158 | + 'TWD' => 'NT$', |
|
159 | + 'TZS' => 'Sh', |
|
160 | + 'UAH' => '₴', |
|
161 | + 'UGX' => 'UGX', |
|
162 | + 'USD' => '$', |
|
163 | + 'UYU' => '$', |
|
164 | + 'UZS' => 'UZS', |
|
165 | + 'VEF' => 'Bs.', |
|
166 | + 'VND' => '₫', |
|
167 | + 'VUV' => 'Vt', |
|
168 | + 'WST' => 'T', |
|
169 | + 'XAF' => 'Fr', |
|
170 | + 'XCD' => '$', |
|
171 | + 'XOF' => 'Fr', |
|
172 | + 'XPF' => 'Fr', |
|
173 | + 'YER' => '﷼', |
|
174 | + 'ZAR' => 'R', |
|
175 | + 'ZMW' => 'ZK', |
|
176 | 176 | ); |
@@ -8,7 +8,7 @@ |
||
8 | 8 | * @version 1.0.19 |
9 | 9 | */ |
10 | 10 | |
11 | -defined( 'ABSPATH' ) || exit; |
|
11 | +defined('ABSPATH') || exit; |
|
12 | 12 | |
13 | 13 | return array( |
14 | 14 | 'AED' => 'د.إ', |
@@ -11,165 +11,165 @@ |
||
11 | 11 | defined( 'ABSPATH' ) || exit; |
12 | 12 | |
13 | 13 | return array( |
14 | - 'USD' => __( 'US Dollar', 'invoicing' ), |
|
15 | - 'EUR' => __( 'Euro', 'invoicing' ), |
|
16 | - 'GBP' => __( 'Pound Sterling', 'invoicing' ), |
|
17 | - 'AED' => __( 'United Arab Emirates', 'invoicing' ), |
|
18 | - 'AFN' => __( 'Afghan Afghani', 'invoicing' ), |
|
19 | - 'ALL' => __( 'Albanian Lek', 'invoicing' ), |
|
20 | - 'AMD' => __( 'Armenian Dram', 'invoicing' ), |
|
21 | - 'ANG' => __( 'Netherlands Antillean Guilder', 'invoicing' ), |
|
22 | - 'AOA' => __( 'Angolan Kwanza', 'invoicing' ), |
|
23 | - 'ARS' => __( 'Argentine Peso', 'invoicing' ), |
|
24 | - 'AUD' => __( 'Australian Dollar', 'invoicing' ), |
|
25 | - 'AWG' => __( 'Aruban Florin', 'invoicing' ), |
|
26 | - 'AZN' => __( 'Azerbaijani Manat', 'invoicing' ), |
|
27 | - 'BAM' => __( 'Bosnia and Herzegovina Convertible Marka', 'invoicing' ), |
|
28 | - 'BBD' => __( 'Barbadian Dollar', 'invoicing' ), |
|
29 | - 'BDT' => __( 'Bangladeshi Taka', 'invoicing' ), |
|
30 | - 'BGN' => __( 'Bulgarian Lev', 'invoicing' ), |
|
31 | - 'BHD' => __( 'Bahraini Dinar', 'invoicing' ), |
|
32 | - 'BIF' => __( 'Burundian Franc', 'invoicing' ), |
|
33 | - 'BMD' => __( 'Bermudian Dollar', 'invoicing' ), |
|
34 | - 'BND' => __( 'Brunei Dollar', 'invoicing' ), |
|
35 | - 'BOB' => __( 'Bolivian Boliviano', 'invoicing' ), |
|
36 | - 'BRL' => __( 'Brazilian Real', 'invoicing' ), |
|
37 | - 'BSD' => __( 'Bahamian Dollar', 'invoicing' ), |
|
38 | - 'BTC' => __( 'Bitcoin', 'invoicing' ), |
|
39 | - 'BTN' => __( 'Bhutanese Ngultrum', 'invoicing' ), |
|
40 | - 'BWP' => __( 'Botswana Pula', 'invoicing' ), |
|
41 | - 'BYN' => __( 'Belarusian Ruble', 'invoicing' ), |
|
42 | - 'BZD' => __( 'Belize Dollar', 'invoicing' ), |
|
43 | - 'CAD' => __( 'Canadian Dollar', 'invoicing' ), |
|
44 | - 'CDF' => __( 'Congolese Franc', 'invoicing' ), |
|
45 | - 'CHF' => __( 'Swiss Franc', 'invoicing' ), |
|
46 | - 'CLP' => __( 'Chilean Peso', 'invoicing' ), |
|
47 | - 'CNY' => __( 'Chinese Yuan', 'invoicing' ), |
|
48 | - 'COP' => __( 'Colombian Peso', 'invoicing' ), |
|
49 | - 'CRC' => __( 'Costa Rican Colon', 'invoicing' ), |
|
50 | - 'CUC' => __( 'Cuban Convertible Peso', 'invoicing' ), |
|
51 | - 'CUP' => __( 'Cuban Peso', 'invoicing' ), |
|
52 | - 'CVE' => __( 'Cape Verdean escudo', 'invoicing' ), |
|
53 | - 'CZK' => __( 'Czech Koruna', 'invoicing' ), |
|
54 | - 'DJF' => __( 'Djiboutian Franc', 'invoicing' ), |
|
55 | - 'DKK' => __( 'Danish Krone', 'invoicing' ), |
|
56 | - 'DOP' => __( 'Dominican Peso', 'invoicing' ), |
|
57 | - 'DZD' => __( 'Algerian Dinar', 'invoicing' ), |
|
58 | - 'EGP' => __( 'Egyptian Pound', 'invoicing' ), |
|
59 | - 'ERN' => __( 'Eritrean Nakfa', 'invoicing' ), |
|
60 | - 'ETB' => __( 'Ethiopian Irr', 'invoicing' ), |
|
61 | - 'FJD' => __( 'Fijian Dollar', 'invoicing' ), |
|
62 | - 'FKP' => __( 'Falkland Islands Pound', 'invoicing' ), |
|
63 | - 'GEL' => __( 'Georgian Lari', 'invoicing' ), |
|
64 | - 'GGP' => __( 'Guernsey Pound', 'invoicing' ), |
|
65 | - 'GHS' => __( 'Ghana Cedi', 'invoicing' ), |
|
66 | - 'GIP' => __( 'Gibraltar Pound', 'invoicing' ), |
|
67 | - 'GMD' => __( 'Gambian Dalasi', 'invoicing' ), |
|
68 | - 'GNF' => __( 'Guinean Franc', 'invoicing' ), |
|
69 | - 'GTQ' => __( 'Guatemalan Quetzal', 'invoicing' ), |
|
70 | - 'GYD' => __( 'Guyanese Dollar', 'invoicing' ), |
|
71 | - 'HKD' => __( 'Hong Kong Dollar', 'invoicing' ), |
|
72 | - 'HNL' => __( 'Honduran Lempira', 'invoicing' ), |
|
73 | - 'HRK' => __( 'Croatian Kuna', 'invoicing' ), |
|
74 | - 'HTG' => __( 'Haitian Gourde', 'invoicing' ), |
|
75 | - 'HUF' => __( 'Hungarian Forint', 'invoicing' ), |
|
76 | - 'IDR' => __( 'Indonesian Rupiah', 'invoicing' ), |
|
77 | - 'ILS' => __( 'Israeli New Shekel', 'invoicing' ), |
|
78 | - 'IMP' => __( 'Manx Pound', 'invoicing' ), |
|
79 | - 'INR' => __( 'Indian Rupee', 'invoicing' ), |
|
80 | - 'IQD' => __( 'Iraqi Dinar', 'invoicing' ), |
|
81 | - 'IRR' => __( 'Iranian Rial', 'invoicing' ), |
|
82 | - 'IRT' => __( 'Iranian Toman', 'invoicing' ), |
|
83 | - 'ISK' => __( 'Icelandic Krona', 'invoicing' ), |
|
84 | - 'JEP' => __( 'Jersey Pound', 'invoicing' ), |
|
85 | - 'JMD' => __( 'Jamaican Dollar', 'invoicing' ), |
|
86 | - 'JOD' => __( 'Jordanian Dinar', 'invoicing' ), |
|
87 | - 'JPY' => __( 'Japanese Yen', 'invoicing' ), |
|
88 | - 'KES' => __( 'Kenyan Shilling', 'invoicing' ), |
|
89 | - 'KGS' => __( 'Kyrgyzstani Som', 'invoicing' ), |
|
90 | - 'KHR' => __( 'Cambodian Riel', 'invoicing' ), |
|
91 | - 'KMF' => __( 'Comorian Franc', 'invoicing' ), |
|
92 | - 'KPW' => __( 'North Korean Won', 'invoicing' ), |
|
93 | - 'KRW' => __( 'South Korean Won', 'invoicing' ), |
|
94 | - 'KWD' => __( 'Kuwaiti Dinar', 'invoicing' ), |
|
95 | - 'KYD' => __( 'Cayman Islands Dollar', 'invoicing' ), |
|
96 | - 'KZT' => __( 'Kazakhstani Tenge', 'invoicing' ), |
|
97 | - 'LAK' => __( 'Lao Kip', 'invoicing' ), |
|
98 | - 'LBP' => __( 'Lebanese Pound', 'invoicing' ), |
|
99 | - 'LKR' => __( 'Sri Lankan Rupee', 'invoicing' ), |
|
100 | - 'LRD' => __( 'Liberian Dollar', 'invoicing' ), |
|
101 | - 'LSL' => __( 'Lesotho Loti', 'invoicing' ), |
|
102 | - 'LYD' => __( 'Libyan Dinar', 'invoicing' ), |
|
103 | - 'MAD' => __( 'Moroccan Dirham', 'invoicing' ), |
|
104 | - 'MDL' => __( 'Moldovan Leu', 'invoicing' ), |
|
105 | - 'MGA' => __( 'Malagasy Ariary', 'invoicing' ), |
|
106 | - 'MKD' => __( 'Macedonian Denar', 'invoicing' ), |
|
107 | - 'MMK' => __( 'Burmese Kyat', 'invoicing' ), |
|
108 | - 'MNT' => __( 'Mongolian Tughrik', 'invoicing' ), |
|
109 | - 'MOP' => __( 'Macanese Pataca', 'invoicing' ), |
|
110 | - 'MRO' => __( 'Mauritanian Ouguiya', 'invoicing' ), |
|
111 | - 'MUR' => __( 'Mauritian Rupee', 'invoicing' ), |
|
112 | - 'MVR' => __( 'Maldivian Rufiyaa', 'invoicing' ), |
|
113 | - 'MWK' => __( 'Malawian Kwacha', 'invoicing' ), |
|
114 | - 'MXN' => __( 'Mexican Peso', 'invoicing' ), |
|
115 | - 'MYR' => __( 'Malaysian Ringgit', 'invoicing' ), |
|
116 | - 'MZN' => __( 'Mozambican Metical', 'invoicing' ), |
|
117 | - 'NAD' => __( 'Namibian Dollar', 'invoicing' ), |
|
118 | - 'NGN' => __( 'Nigerian Naira', 'invoicing' ), |
|
119 | - 'NIO' => __( 'Nicaraguan Cordoba', 'invoicing' ), |
|
120 | - 'NOK' => __( 'Norwegian Krone', 'invoicing' ), |
|
121 | - 'NPR' => __( 'Nepalese Rupee', 'invoicing' ), |
|
122 | - 'NZD' => __( 'New Zealand Dollar', 'invoicing' ), |
|
123 | - 'OMR' => __( 'Omani Rial', 'invoicing' ), |
|
124 | - 'PAB' => __( 'Panamanian Balboa', 'invoicing' ), |
|
125 | - 'PEN' => __( 'Peruvian Nuevo Sol', 'invoicing' ), |
|
126 | - 'PGK' => __( 'Papua New Guinean Kina', 'invoicing' ), |
|
127 | - 'PHP' => __( 'Philippine Peso', 'invoicing' ), |
|
128 | - 'PKR' => __( 'Pakistani Rupee', 'invoicing' ), |
|
129 | - 'PLN' => __( 'Polish Zloty', 'invoicing' ), |
|
130 | - 'PRB' => __( 'Transnistrian Ruble', 'invoicing' ), |
|
131 | - 'PYG' => __( 'Paraguayan Guarani', 'invoicing' ), |
|
132 | - 'QAR' => __( 'Qatari Riyal', 'invoicing' ), |
|
133 | - 'RON' => __( 'Romanian Leu', 'invoicing' ), |
|
134 | - 'RSD' => __( 'Serbian Dinar', 'invoicing' ), |
|
135 | - 'RUB' => __( 'Russian Ruble', 'invoicing' ), |
|
136 | - 'RWF' => __( 'Rwandan Franc', 'invoicing' ), |
|
137 | - 'SAR' => __( 'Saudi Riyal', 'invoicing' ), |
|
138 | - 'SBD' => __( 'Solomon Islands Dollar', 'invoicing' ), |
|
139 | - 'SCR' => __( 'Seychellois Rupee', 'invoicing' ), |
|
140 | - 'SDG' => __( 'Sudanese Pound', 'invoicing' ), |
|
141 | - 'SEK' => __( 'Swedish Krona', 'invoicing' ), |
|
142 | - 'SGD' => __( 'Singapore Dollar', 'invoicing' ), |
|
143 | - 'SHP' => __( 'Saint Helena Pound', 'invoicing' ), |
|
144 | - 'SLL' => __( 'Sierra Leonean Leone', 'invoicing' ), |
|
145 | - 'SOS' => __( 'Somali Shilling', 'invoicing' ), |
|
146 | - 'SRD' => __( 'Surinamese Dollar', 'invoicing' ), |
|
147 | - 'SSP' => __( 'South Sudanese Pound', 'invoicing' ), |
|
148 | - 'STD' => __( 'Sao Tomean Dobra', 'invoicing' ), |
|
149 | - 'SYP' => __( 'Syrian Pound', 'invoicing' ), |
|
150 | - 'SZL' => __( 'Swazi Lilangeni', 'invoicing' ), |
|
151 | - 'THB' => __( 'Thai Baht', 'invoicing' ), |
|
152 | - 'TJS' => __( 'Tajikistani Somoni', 'invoicing' ), |
|
153 | - 'TMT' => __( 'Turkmenistan Manat', 'invoicing' ), |
|
154 | - 'TND' => __( 'Tunisian Dinar', 'invoicing' ), |
|
155 | - 'TOP' => __( 'Tongan Paʻanga', 'invoicing' ), |
|
156 | - 'TRY' => __( 'Turkish Lira', 'invoicing' ), |
|
157 | - 'TTD' => __( 'Trinidad and Tobago Dollar', 'invoicing' ), |
|
158 | - 'TWD' => __( 'New Taiwan Dollar', 'invoicing' ), |
|
159 | - 'TZS' => __( 'Tanzanian Shilling', 'invoicing' ), |
|
160 | - 'UAH' => __( 'Ukrainian Hryvnia', 'invoicing' ), |
|
161 | - 'UGX' => __( 'Ugandan Shilling', 'invoicing' ), |
|
162 | - 'UYU' => __( 'Uruguayan Peso', 'invoicing' ), |
|
163 | - 'UZS' => __( 'Uzbekistani Som', 'invoicing' ), |
|
164 | - 'VEF' => __( 'Venezuelan Bolívar', 'invoicing' ), |
|
165 | - 'VND' => __( 'Vietnamese Dong', 'invoicing' ), |
|
166 | - 'VUV' => __( 'Vanuatu Vatu', 'invoicing' ), |
|
167 | - 'WST' => __( 'Samoan Tala', 'invoicing' ), |
|
168 | - 'XAF' => __( 'Central African CFA Franc', 'invoicing' ), |
|
169 | - 'XCD' => __( 'East Caribbean Dollar', 'invoicing' ), |
|
170 | - 'XOF' => __( 'West African CFA Franc', 'invoicing' ), |
|
171 | - 'XPF' => __( 'CFP Franc', 'invoicing' ), |
|
172 | - 'YER' => __( 'Yemeni Rial', 'invoicing' ), |
|
173 | - 'ZAR' => __( 'South African Rand', 'invoicing' ), |
|
174 | - 'ZMW' => __( 'Zambian Kwacha', 'invoicing' ), |
|
14 | + 'USD' => __( 'US Dollar', 'invoicing' ), |
|
15 | + 'EUR' => __( 'Euro', 'invoicing' ), |
|
16 | + 'GBP' => __( 'Pound Sterling', 'invoicing' ), |
|
17 | + 'AED' => __( 'United Arab Emirates', 'invoicing' ), |
|
18 | + 'AFN' => __( 'Afghan Afghani', 'invoicing' ), |
|
19 | + 'ALL' => __( 'Albanian Lek', 'invoicing' ), |
|
20 | + 'AMD' => __( 'Armenian Dram', 'invoicing' ), |
|
21 | + 'ANG' => __( 'Netherlands Antillean Guilder', 'invoicing' ), |
|
22 | + 'AOA' => __( 'Angolan Kwanza', 'invoicing' ), |
|
23 | + 'ARS' => __( 'Argentine Peso', 'invoicing' ), |
|
24 | + 'AUD' => __( 'Australian Dollar', 'invoicing' ), |
|
25 | + 'AWG' => __( 'Aruban Florin', 'invoicing' ), |
|
26 | + 'AZN' => __( 'Azerbaijani Manat', 'invoicing' ), |
|
27 | + 'BAM' => __( 'Bosnia and Herzegovina Convertible Marka', 'invoicing' ), |
|
28 | + 'BBD' => __( 'Barbadian Dollar', 'invoicing' ), |
|
29 | + 'BDT' => __( 'Bangladeshi Taka', 'invoicing' ), |
|
30 | + 'BGN' => __( 'Bulgarian Lev', 'invoicing' ), |
|
31 | + 'BHD' => __( 'Bahraini Dinar', 'invoicing' ), |
|
32 | + 'BIF' => __( 'Burundian Franc', 'invoicing' ), |
|
33 | + 'BMD' => __( 'Bermudian Dollar', 'invoicing' ), |
|
34 | + 'BND' => __( 'Brunei Dollar', 'invoicing' ), |
|
35 | + 'BOB' => __( 'Bolivian Boliviano', 'invoicing' ), |
|
36 | + 'BRL' => __( 'Brazilian Real', 'invoicing' ), |
|
37 | + 'BSD' => __( 'Bahamian Dollar', 'invoicing' ), |
|
38 | + 'BTC' => __( 'Bitcoin', 'invoicing' ), |
|
39 | + 'BTN' => __( 'Bhutanese Ngultrum', 'invoicing' ), |
|
40 | + 'BWP' => __( 'Botswana Pula', 'invoicing' ), |
|
41 | + 'BYN' => __( 'Belarusian Ruble', 'invoicing' ), |
|
42 | + 'BZD' => __( 'Belize Dollar', 'invoicing' ), |
|
43 | + 'CAD' => __( 'Canadian Dollar', 'invoicing' ), |
|
44 | + 'CDF' => __( 'Congolese Franc', 'invoicing' ), |
|
45 | + 'CHF' => __( 'Swiss Franc', 'invoicing' ), |
|
46 | + 'CLP' => __( 'Chilean Peso', 'invoicing' ), |
|
47 | + 'CNY' => __( 'Chinese Yuan', 'invoicing' ), |
|
48 | + 'COP' => __( 'Colombian Peso', 'invoicing' ), |
|
49 | + 'CRC' => __( 'Costa Rican Colon', 'invoicing' ), |
|
50 | + 'CUC' => __( 'Cuban Convertible Peso', 'invoicing' ), |
|
51 | + 'CUP' => __( 'Cuban Peso', 'invoicing' ), |
|
52 | + 'CVE' => __( 'Cape Verdean escudo', 'invoicing' ), |
|
53 | + 'CZK' => __( 'Czech Koruna', 'invoicing' ), |
|
54 | + 'DJF' => __( 'Djiboutian Franc', 'invoicing' ), |
|
55 | + 'DKK' => __( 'Danish Krone', 'invoicing' ), |
|
56 | + 'DOP' => __( 'Dominican Peso', 'invoicing' ), |
|
57 | + 'DZD' => __( 'Algerian Dinar', 'invoicing' ), |
|
58 | + 'EGP' => __( 'Egyptian Pound', 'invoicing' ), |
|
59 | + 'ERN' => __( 'Eritrean Nakfa', 'invoicing' ), |
|
60 | + 'ETB' => __( 'Ethiopian Irr', 'invoicing' ), |
|
61 | + 'FJD' => __( 'Fijian Dollar', 'invoicing' ), |
|
62 | + 'FKP' => __( 'Falkland Islands Pound', 'invoicing' ), |
|
63 | + 'GEL' => __( 'Georgian Lari', 'invoicing' ), |
|
64 | + 'GGP' => __( 'Guernsey Pound', 'invoicing' ), |
|
65 | + 'GHS' => __( 'Ghana Cedi', 'invoicing' ), |
|
66 | + 'GIP' => __( 'Gibraltar Pound', 'invoicing' ), |
|
67 | + 'GMD' => __( 'Gambian Dalasi', 'invoicing' ), |
|
68 | + 'GNF' => __( 'Guinean Franc', 'invoicing' ), |
|
69 | + 'GTQ' => __( 'Guatemalan Quetzal', 'invoicing' ), |
|
70 | + 'GYD' => __( 'Guyanese Dollar', 'invoicing' ), |
|
71 | + 'HKD' => __( 'Hong Kong Dollar', 'invoicing' ), |
|
72 | + 'HNL' => __( 'Honduran Lempira', 'invoicing' ), |
|
73 | + 'HRK' => __( 'Croatian Kuna', 'invoicing' ), |
|
74 | + 'HTG' => __( 'Haitian Gourde', 'invoicing' ), |
|
75 | + 'HUF' => __( 'Hungarian Forint', 'invoicing' ), |
|
76 | + 'IDR' => __( 'Indonesian Rupiah', 'invoicing' ), |
|
77 | + 'ILS' => __( 'Israeli New Shekel', 'invoicing' ), |
|
78 | + 'IMP' => __( 'Manx Pound', 'invoicing' ), |
|
79 | + 'INR' => __( 'Indian Rupee', 'invoicing' ), |
|
80 | + 'IQD' => __( 'Iraqi Dinar', 'invoicing' ), |
|
81 | + 'IRR' => __( 'Iranian Rial', 'invoicing' ), |
|
82 | + 'IRT' => __( 'Iranian Toman', 'invoicing' ), |
|
83 | + 'ISK' => __( 'Icelandic Krona', 'invoicing' ), |
|
84 | + 'JEP' => __( 'Jersey Pound', 'invoicing' ), |
|
85 | + 'JMD' => __( 'Jamaican Dollar', 'invoicing' ), |
|
86 | + 'JOD' => __( 'Jordanian Dinar', 'invoicing' ), |
|
87 | + 'JPY' => __( 'Japanese Yen', 'invoicing' ), |
|
88 | + 'KES' => __( 'Kenyan Shilling', 'invoicing' ), |
|
89 | + 'KGS' => __( 'Kyrgyzstani Som', 'invoicing' ), |
|
90 | + 'KHR' => __( 'Cambodian Riel', 'invoicing' ), |
|
91 | + 'KMF' => __( 'Comorian Franc', 'invoicing' ), |
|
92 | + 'KPW' => __( 'North Korean Won', 'invoicing' ), |
|
93 | + 'KRW' => __( 'South Korean Won', 'invoicing' ), |
|
94 | + 'KWD' => __( 'Kuwaiti Dinar', 'invoicing' ), |
|
95 | + 'KYD' => __( 'Cayman Islands Dollar', 'invoicing' ), |
|
96 | + 'KZT' => __( 'Kazakhstani Tenge', 'invoicing' ), |
|
97 | + 'LAK' => __( 'Lao Kip', 'invoicing' ), |
|
98 | + 'LBP' => __( 'Lebanese Pound', 'invoicing' ), |
|
99 | + 'LKR' => __( 'Sri Lankan Rupee', 'invoicing' ), |
|
100 | + 'LRD' => __( 'Liberian Dollar', 'invoicing' ), |
|
101 | + 'LSL' => __( 'Lesotho Loti', 'invoicing' ), |
|
102 | + 'LYD' => __( 'Libyan Dinar', 'invoicing' ), |
|
103 | + 'MAD' => __( 'Moroccan Dirham', 'invoicing' ), |
|
104 | + 'MDL' => __( 'Moldovan Leu', 'invoicing' ), |
|
105 | + 'MGA' => __( 'Malagasy Ariary', 'invoicing' ), |
|
106 | + 'MKD' => __( 'Macedonian Denar', 'invoicing' ), |
|
107 | + 'MMK' => __( 'Burmese Kyat', 'invoicing' ), |
|
108 | + 'MNT' => __( 'Mongolian Tughrik', 'invoicing' ), |
|
109 | + 'MOP' => __( 'Macanese Pataca', 'invoicing' ), |
|
110 | + 'MRO' => __( 'Mauritanian Ouguiya', 'invoicing' ), |
|
111 | + 'MUR' => __( 'Mauritian Rupee', 'invoicing' ), |
|
112 | + 'MVR' => __( 'Maldivian Rufiyaa', 'invoicing' ), |
|
113 | + 'MWK' => __( 'Malawian Kwacha', 'invoicing' ), |
|
114 | + 'MXN' => __( 'Mexican Peso', 'invoicing' ), |
|
115 | + 'MYR' => __( 'Malaysian Ringgit', 'invoicing' ), |
|
116 | + 'MZN' => __( 'Mozambican Metical', 'invoicing' ), |
|
117 | + 'NAD' => __( 'Namibian Dollar', 'invoicing' ), |
|
118 | + 'NGN' => __( 'Nigerian Naira', 'invoicing' ), |
|
119 | + 'NIO' => __( 'Nicaraguan Cordoba', 'invoicing' ), |
|
120 | + 'NOK' => __( 'Norwegian Krone', 'invoicing' ), |
|
121 | + 'NPR' => __( 'Nepalese Rupee', 'invoicing' ), |
|
122 | + 'NZD' => __( 'New Zealand Dollar', 'invoicing' ), |
|
123 | + 'OMR' => __( 'Omani Rial', 'invoicing' ), |
|
124 | + 'PAB' => __( 'Panamanian Balboa', 'invoicing' ), |
|
125 | + 'PEN' => __( 'Peruvian Nuevo Sol', 'invoicing' ), |
|
126 | + 'PGK' => __( 'Papua New Guinean Kina', 'invoicing' ), |
|
127 | + 'PHP' => __( 'Philippine Peso', 'invoicing' ), |
|
128 | + 'PKR' => __( 'Pakistani Rupee', 'invoicing' ), |
|
129 | + 'PLN' => __( 'Polish Zloty', 'invoicing' ), |
|
130 | + 'PRB' => __( 'Transnistrian Ruble', 'invoicing' ), |
|
131 | + 'PYG' => __( 'Paraguayan Guarani', 'invoicing' ), |
|
132 | + 'QAR' => __( 'Qatari Riyal', 'invoicing' ), |
|
133 | + 'RON' => __( 'Romanian Leu', 'invoicing' ), |
|
134 | + 'RSD' => __( 'Serbian Dinar', 'invoicing' ), |
|
135 | + 'RUB' => __( 'Russian Ruble', 'invoicing' ), |
|
136 | + 'RWF' => __( 'Rwandan Franc', 'invoicing' ), |
|
137 | + 'SAR' => __( 'Saudi Riyal', 'invoicing' ), |
|
138 | + 'SBD' => __( 'Solomon Islands Dollar', 'invoicing' ), |
|
139 | + 'SCR' => __( 'Seychellois Rupee', 'invoicing' ), |
|
140 | + 'SDG' => __( 'Sudanese Pound', 'invoicing' ), |
|
141 | + 'SEK' => __( 'Swedish Krona', 'invoicing' ), |
|
142 | + 'SGD' => __( 'Singapore Dollar', 'invoicing' ), |
|
143 | + 'SHP' => __( 'Saint Helena Pound', 'invoicing' ), |
|
144 | + 'SLL' => __( 'Sierra Leonean Leone', 'invoicing' ), |
|
145 | + 'SOS' => __( 'Somali Shilling', 'invoicing' ), |
|
146 | + 'SRD' => __( 'Surinamese Dollar', 'invoicing' ), |
|
147 | + 'SSP' => __( 'South Sudanese Pound', 'invoicing' ), |
|
148 | + 'STD' => __( 'Sao Tomean Dobra', 'invoicing' ), |
|
149 | + 'SYP' => __( 'Syrian Pound', 'invoicing' ), |
|
150 | + 'SZL' => __( 'Swazi Lilangeni', 'invoicing' ), |
|
151 | + 'THB' => __( 'Thai Baht', 'invoicing' ), |
|
152 | + 'TJS' => __( 'Tajikistani Somoni', 'invoicing' ), |
|
153 | + 'TMT' => __( 'Turkmenistan Manat', 'invoicing' ), |
|
154 | + 'TND' => __( 'Tunisian Dinar', 'invoicing' ), |
|
155 | + 'TOP' => __( 'Tongan Paʻanga', 'invoicing' ), |
|
156 | + 'TRY' => __( 'Turkish Lira', 'invoicing' ), |
|
157 | + 'TTD' => __( 'Trinidad and Tobago Dollar', 'invoicing' ), |
|
158 | + 'TWD' => __( 'New Taiwan Dollar', 'invoicing' ), |
|
159 | + 'TZS' => __( 'Tanzanian Shilling', 'invoicing' ), |
|
160 | + 'UAH' => __( 'Ukrainian Hryvnia', 'invoicing' ), |
|
161 | + 'UGX' => __( 'Ugandan Shilling', 'invoicing' ), |
|
162 | + 'UYU' => __( 'Uruguayan Peso', 'invoicing' ), |
|
163 | + 'UZS' => __( 'Uzbekistani Som', 'invoicing' ), |
|
164 | + 'VEF' => __( 'Venezuelan Bolívar', 'invoicing' ), |
|
165 | + 'VND' => __( 'Vietnamese Dong', 'invoicing' ), |
|
166 | + 'VUV' => __( 'Vanuatu Vatu', 'invoicing' ), |
|
167 | + 'WST' => __( 'Samoan Tala', 'invoicing' ), |
|
168 | + 'XAF' => __( 'Central African CFA Franc', 'invoicing' ), |
|
169 | + 'XCD' => __( 'East Caribbean Dollar', 'invoicing' ), |
|
170 | + 'XOF' => __( 'West African CFA Franc', 'invoicing' ), |
|
171 | + 'XPF' => __( 'CFP Franc', 'invoicing' ), |
|
172 | + 'YER' => __( 'Yemeni Rial', 'invoicing' ), |
|
173 | + 'ZAR' => __( 'South African Rand', 'invoicing' ), |
|
174 | + 'ZMW' => __( 'Zambian Kwacha', 'invoicing' ), |
|
175 | 175 | ); |
@@ -8,168 +8,168 @@ |
||
8 | 8 | * @version 1.0.19 |
9 | 9 | */ |
10 | 10 | |
11 | -defined( 'ABSPATH' ) || exit; |
|
11 | +defined('ABSPATH') || exit; |
|
12 | 12 | |
13 | 13 | return array( |
14 | - 'USD' => __( 'US Dollar', 'invoicing' ), |
|
15 | - 'EUR' => __( 'Euro', 'invoicing' ), |
|
16 | - 'GBP' => __( 'Pound Sterling', 'invoicing' ), |
|
17 | - 'AED' => __( 'United Arab Emirates', 'invoicing' ), |
|
18 | - 'AFN' => __( 'Afghan Afghani', 'invoicing' ), |
|
19 | - 'ALL' => __( 'Albanian Lek', 'invoicing' ), |
|
20 | - 'AMD' => __( 'Armenian Dram', 'invoicing' ), |
|
21 | - 'ANG' => __( 'Netherlands Antillean Guilder', 'invoicing' ), |
|
22 | - 'AOA' => __( 'Angolan Kwanza', 'invoicing' ), |
|
23 | - 'ARS' => __( 'Argentine Peso', 'invoicing' ), |
|
24 | - 'AUD' => __( 'Australian Dollar', 'invoicing' ), |
|
25 | - 'AWG' => __( 'Aruban Florin', 'invoicing' ), |
|
26 | - 'AZN' => __( 'Azerbaijani Manat', 'invoicing' ), |
|
27 | - 'BAM' => __( 'Bosnia and Herzegovina Convertible Marka', 'invoicing' ), |
|
28 | - 'BBD' => __( 'Barbadian Dollar', 'invoicing' ), |
|
29 | - 'BDT' => __( 'Bangladeshi Taka', 'invoicing' ), |
|
30 | - 'BGN' => __( 'Bulgarian Lev', 'invoicing' ), |
|
31 | - 'BHD' => __( 'Bahraini Dinar', 'invoicing' ), |
|
32 | - 'BIF' => __( 'Burundian Franc', 'invoicing' ), |
|
33 | - 'BMD' => __( 'Bermudian Dollar', 'invoicing' ), |
|
34 | - 'BND' => __( 'Brunei Dollar', 'invoicing' ), |
|
35 | - 'BOB' => __( 'Bolivian Boliviano', 'invoicing' ), |
|
36 | - 'BRL' => __( 'Brazilian Real', 'invoicing' ), |
|
37 | - 'BSD' => __( 'Bahamian Dollar', 'invoicing' ), |
|
38 | - 'BTC' => __( 'Bitcoin', 'invoicing' ), |
|
39 | - 'BTN' => __( 'Bhutanese Ngultrum', 'invoicing' ), |
|
40 | - 'BWP' => __( 'Botswana Pula', 'invoicing' ), |
|
41 | - 'BYN' => __( 'Belarusian Ruble', 'invoicing' ), |
|
42 | - 'BZD' => __( 'Belize Dollar', 'invoicing' ), |
|
43 | - 'CAD' => __( 'Canadian Dollar', 'invoicing' ), |
|
44 | - 'CDF' => __( 'Congolese Franc', 'invoicing' ), |
|
45 | - 'CHF' => __( 'Swiss Franc', 'invoicing' ), |
|
46 | - 'CLP' => __( 'Chilean Peso', 'invoicing' ), |
|
47 | - 'CNY' => __( 'Chinese Yuan', 'invoicing' ), |
|
48 | - 'COP' => __( 'Colombian Peso', 'invoicing' ), |
|
49 | - 'CRC' => __( 'Costa Rican Colon', 'invoicing' ), |
|
50 | - 'CUC' => __( 'Cuban Convertible Peso', 'invoicing' ), |
|
51 | - 'CUP' => __( 'Cuban Peso', 'invoicing' ), |
|
52 | - 'CVE' => __( 'Cape Verdean escudo', 'invoicing' ), |
|
53 | - 'CZK' => __( 'Czech Koruna', 'invoicing' ), |
|
54 | - 'DJF' => __( 'Djiboutian Franc', 'invoicing' ), |
|
55 | - 'DKK' => __( 'Danish Krone', 'invoicing' ), |
|
56 | - 'DOP' => __( 'Dominican Peso', 'invoicing' ), |
|
57 | - 'DZD' => __( 'Algerian Dinar', 'invoicing' ), |
|
58 | - 'EGP' => __( 'Egyptian Pound', 'invoicing' ), |
|
59 | - 'ERN' => __( 'Eritrean Nakfa', 'invoicing' ), |
|
60 | - 'ETB' => __( 'Ethiopian Irr', 'invoicing' ), |
|
61 | - 'FJD' => __( 'Fijian Dollar', 'invoicing' ), |
|
62 | - 'FKP' => __( 'Falkland Islands Pound', 'invoicing' ), |
|
63 | - 'GEL' => __( 'Georgian Lari', 'invoicing' ), |
|
64 | - 'GGP' => __( 'Guernsey Pound', 'invoicing' ), |
|
65 | - 'GHS' => __( 'Ghana Cedi', 'invoicing' ), |
|
66 | - 'GIP' => __( 'Gibraltar Pound', 'invoicing' ), |
|
67 | - 'GMD' => __( 'Gambian Dalasi', 'invoicing' ), |
|
68 | - 'GNF' => __( 'Guinean Franc', 'invoicing' ), |
|
69 | - 'GTQ' => __( 'Guatemalan Quetzal', 'invoicing' ), |
|
70 | - 'GYD' => __( 'Guyanese Dollar', 'invoicing' ), |
|
71 | - 'HKD' => __( 'Hong Kong Dollar', 'invoicing' ), |
|
72 | - 'HNL' => __( 'Honduran Lempira', 'invoicing' ), |
|
73 | - 'HRK' => __( 'Croatian Kuna', 'invoicing' ), |
|
74 | - 'HTG' => __( 'Haitian Gourde', 'invoicing' ), |
|
75 | - 'HUF' => __( 'Hungarian Forint', 'invoicing' ), |
|
76 | - 'IDR' => __( 'Indonesian Rupiah', 'invoicing' ), |
|
77 | - 'ILS' => __( 'Israeli New Shekel', 'invoicing' ), |
|
78 | - 'IMP' => __( 'Manx Pound', 'invoicing' ), |
|
79 | - 'INR' => __( 'Indian Rupee', 'invoicing' ), |
|
80 | - 'IQD' => __( 'Iraqi Dinar', 'invoicing' ), |
|
81 | - 'IRR' => __( 'Iranian Rial', 'invoicing' ), |
|
82 | - 'IRT' => __( 'Iranian Toman', 'invoicing' ), |
|
83 | - 'ISK' => __( 'Icelandic Krona', 'invoicing' ), |
|
84 | - 'JEP' => __( 'Jersey Pound', 'invoicing' ), |
|
85 | - 'JMD' => __( 'Jamaican Dollar', 'invoicing' ), |
|
86 | - 'JOD' => __( 'Jordanian Dinar', 'invoicing' ), |
|
87 | - 'JPY' => __( 'Japanese Yen', 'invoicing' ), |
|
88 | - 'KES' => __( 'Kenyan Shilling', 'invoicing' ), |
|
89 | - 'KGS' => __( 'Kyrgyzstani Som', 'invoicing' ), |
|
90 | - 'KHR' => __( 'Cambodian Riel', 'invoicing' ), |
|
91 | - 'KMF' => __( 'Comorian Franc', 'invoicing' ), |
|
92 | - 'KPW' => __( 'North Korean Won', 'invoicing' ), |
|
93 | - 'KRW' => __( 'South Korean Won', 'invoicing' ), |
|
94 | - 'KWD' => __( 'Kuwaiti Dinar', 'invoicing' ), |
|
95 | - 'KYD' => __( 'Cayman Islands Dollar', 'invoicing' ), |
|
96 | - 'KZT' => __( 'Kazakhstani Tenge', 'invoicing' ), |
|
97 | - 'LAK' => __( 'Lao Kip', 'invoicing' ), |
|
98 | - 'LBP' => __( 'Lebanese Pound', 'invoicing' ), |
|
99 | - 'LKR' => __( 'Sri Lankan Rupee', 'invoicing' ), |
|
100 | - 'LRD' => __( 'Liberian Dollar', 'invoicing' ), |
|
101 | - 'LSL' => __( 'Lesotho Loti', 'invoicing' ), |
|
102 | - 'LYD' => __( 'Libyan Dinar', 'invoicing' ), |
|
103 | - 'MAD' => __( 'Moroccan Dirham', 'invoicing' ), |
|
104 | - 'MDL' => __( 'Moldovan Leu', 'invoicing' ), |
|
105 | - 'MGA' => __( 'Malagasy Ariary', 'invoicing' ), |
|
106 | - 'MKD' => __( 'Macedonian Denar', 'invoicing' ), |
|
107 | - 'MMK' => __( 'Burmese Kyat', 'invoicing' ), |
|
108 | - 'MNT' => __( 'Mongolian Tughrik', 'invoicing' ), |
|
109 | - 'MOP' => __( 'Macanese Pataca', 'invoicing' ), |
|
110 | - 'MRO' => __( 'Mauritanian Ouguiya', 'invoicing' ), |
|
111 | - 'MUR' => __( 'Mauritian Rupee', 'invoicing' ), |
|
112 | - 'MVR' => __( 'Maldivian Rufiyaa', 'invoicing' ), |
|
113 | - 'MWK' => __( 'Malawian Kwacha', 'invoicing' ), |
|
114 | - 'MXN' => __( 'Mexican Peso', 'invoicing' ), |
|
115 | - 'MYR' => __( 'Malaysian Ringgit', 'invoicing' ), |
|
116 | - 'MZN' => __( 'Mozambican Metical', 'invoicing' ), |
|
117 | - 'NAD' => __( 'Namibian Dollar', 'invoicing' ), |
|
118 | - 'NGN' => __( 'Nigerian Naira', 'invoicing' ), |
|
119 | - 'NIO' => __( 'Nicaraguan Cordoba', 'invoicing' ), |
|
120 | - 'NOK' => __( 'Norwegian Krone', 'invoicing' ), |
|
121 | - 'NPR' => __( 'Nepalese Rupee', 'invoicing' ), |
|
122 | - 'NZD' => __( 'New Zealand Dollar', 'invoicing' ), |
|
123 | - 'OMR' => __( 'Omani Rial', 'invoicing' ), |
|
124 | - 'PAB' => __( 'Panamanian Balboa', 'invoicing' ), |
|
125 | - 'PEN' => __( 'Peruvian Nuevo Sol', 'invoicing' ), |
|
126 | - 'PGK' => __( 'Papua New Guinean Kina', 'invoicing' ), |
|
127 | - 'PHP' => __( 'Philippine Peso', 'invoicing' ), |
|
128 | - 'PKR' => __( 'Pakistani Rupee', 'invoicing' ), |
|
129 | - 'PLN' => __( 'Polish Zloty', 'invoicing' ), |
|
130 | - 'PRB' => __( 'Transnistrian Ruble', 'invoicing' ), |
|
131 | - 'PYG' => __( 'Paraguayan Guarani', 'invoicing' ), |
|
132 | - 'QAR' => __( 'Qatari Riyal', 'invoicing' ), |
|
133 | - 'RON' => __( 'Romanian Leu', 'invoicing' ), |
|
134 | - 'RSD' => __( 'Serbian Dinar', 'invoicing' ), |
|
135 | - 'RUB' => __( 'Russian Ruble', 'invoicing' ), |
|
136 | - 'RWF' => __( 'Rwandan Franc', 'invoicing' ), |
|
137 | - 'SAR' => __( 'Saudi Riyal', 'invoicing' ), |
|
138 | - 'SBD' => __( 'Solomon Islands Dollar', 'invoicing' ), |
|
139 | - 'SCR' => __( 'Seychellois Rupee', 'invoicing' ), |
|
140 | - 'SDG' => __( 'Sudanese Pound', 'invoicing' ), |
|
141 | - 'SEK' => __( 'Swedish Krona', 'invoicing' ), |
|
142 | - 'SGD' => __( 'Singapore Dollar', 'invoicing' ), |
|
143 | - 'SHP' => __( 'Saint Helena Pound', 'invoicing' ), |
|
144 | - 'SLL' => __( 'Sierra Leonean Leone', 'invoicing' ), |
|
145 | - 'SOS' => __( 'Somali Shilling', 'invoicing' ), |
|
146 | - 'SRD' => __( 'Surinamese Dollar', 'invoicing' ), |
|
147 | - 'SSP' => __( 'South Sudanese Pound', 'invoicing' ), |
|
148 | - 'STD' => __( 'Sao Tomean Dobra', 'invoicing' ), |
|
149 | - 'SYP' => __( 'Syrian Pound', 'invoicing' ), |
|
150 | - 'SZL' => __( 'Swazi Lilangeni', 'invoicing' ), |
|
151 | - 'THB' => __( 'Thai Baht', 'invoicing' ), |
|
152 | - 'TJS' => __( 'Tajikistani Somoni', 'invoicing' ), |
|
153 | - 'TMT' => __( 'Turkmenistan Manat', 'invoicing' ), |
|
154 | - 'TND' => __( 'Tunisian Dinar', 'invoicing' ), |
|
155 | - 'TOP' => __( 'Tongan Paʻanga', 'invoicing' ), |
|
156 | - 'TRY' => __( 'Turkish Lira', 'invoicing' ), |
|
157 | - 'TTD' => __( 'Trinidad and Tobago Dollar', 'invoicing' ), |
|
158 | - 'TWD' => __( 'New Taiwan Dollar', 'invoicing' ), |
|
159 | - 'TZS' => __( 'Tanzanian Shilling', 'invoicing' ), |
|
160 | - 'UAH' => __( 'Ukrainian Hryvnia', 'invoicing' ), |
|
161 | - 'UGX' => __( 'Ugandan Shilling', 'invoicing' ), |
|
162 | - 'UYU' => __( 'Uruguayan Peso', 'invoicing' ), |
|
163 | - 'UZS' => __( 'Uzbekistani Som', 'invoicing' ), |
|
164 | - 'VEF' => __( 'Venezuelan Bolívar', 'invoicing' ), |
|
165 | - 'VND' => __( 'Vietnamese Dong', 'invoicing' ), |
|
166 | - 'VUV' => __( 'Vanuatu Vatu', 'invoicing' ), |
|
167 | - 'WST' => __( 'Samoan Tala', 'invoicing' ), |
|
168 | - 'XAF' => __( 'Central African CFA Franc', 'invoicing' ), |
|
169 | - 'XCD' => __( 'East Caribbean Dollar', 'invoicing' ), |
|
170 | - 'XOF' => __( 'West African CFA Franc', 'invoicing' ), |
|
171 | - 'XPF' => __( 'CFP Franc', 'invoicing' ), |
|
172 | - 'YER' => __( 'Yemeni Rial', 'invoicing' ), |
|
173 | - 'ZAR' => __( 'South African Rand', 'invoicing' ), |
|
174 | - 'ZMW' => __( 'Zambian Kwacha', 'invoicing' ), |
|
14 | + 'USD' => __('US Dollar', 'invoicing'), |
|
15 | + 'EUR' => __('Euro', 'invoicing'), |
|
16 | + 'GBP' => __('Pound Sterling', 'invoicing'), |
|
17 | + 'AED' => __('United Arab Emirates', 'invoicing'), |
|
18 | + 'AFN' => __('Afghan Afghani', 'invoicing'), |
|
19 | + 'ALL' => __('Albanian Lek', 'invoicing'), |
|
20 | + 'AMD' => __('Armenian Dram', 'invoicing'), |
|
21 | + 'ANG' => __('Netherlands Antillean Guilder', 'invoicing'), |
|
22 | + 'AOA' => __('Angolan Kwanza', 'invoicing'), |
|
23 | + 'ARS' => __('Argentine Peso', 'invoicing'), |
|
24 | + 'AUD' => __('Australian Dollar', 'invoicing'), |
|
25 | + 'AWG' => __('Aruban Florin', 'invoicing'), |
|
26 | + 'AZN' => __('Azerbaijani Manat', 'invoicing'), |
|
27 | + 'BAM' => __('Bosnia and Herzegovina Convertible Marka', 'invoicing'), |
|
28 | + 'BBD' => __('Barbadian Dollar', 'invoicing'), |
|
29 | + 'BDT' => __('Bangladeshi Taka', 'invoicing'), |
|
30 | + 'BGN' => __('Bulgarian Lev', 'invoicing'), |
|
31 | + 'BHD' => __('Bahraini Dinar', 'invoicing'), |
|
32 | + 'BIF' => __('Burundian Franc', 'invoicing'), |
|
33 | + 'BMD' => __('Bermudian Dollar', 'invoicing'), |
|
34 | + 'BND' => __('Brunei Dollar', 'invoicing'), |
|
35 | + 'BOB' => __('Bolivian Boliviano', 'invoicing'), |
|
36 | + 'BRL' => __('Brazilian Real', 'invoicing'), |
|
37 | + 'BSD' => __('Bahamian Dollar', 'invoicing'), |
|
38 | + 'BTC' => __('Bitcoin', 'invoicing'), |
|
39 | + 'BTN' => __('Bhutanese Ngultrum', 'invoicing'), |
|
40 | + 'BWP' => __('Botswana Pula', 'invoicing'), |
|
41 | + 'BYN' => __('Belarusian Ruble', 'invoicing'), |
|
42 | + 'BZD' => __('Belize Dollar', 'invoicing'), |
|
43 | + 'CAD' => __('Canadian Dollar', 'invoicing'), |
|
44 | + 'CDF' => __('Congolese Franc', 'invoicing'), |
|
45 | + 'CHF' => __('Swiss Franc', 'invoicing'), |
|
46 | + 'CLP' => __('Chilean Peso', 'invoicing'), |
|
47 | + 'CNY' => __('Chinese Yuan', 'invoicing'), |
|
48 | + 'COP' => __('Colombian Peso', 'invoicing'), |
|
49 | + 'CRC' => __('Costa Rican Colon', 'invoicing'), |
|
50 | + 'CUC' => __('Cuban Convertible Peso', 'invoicing'), |
|
51 | + 'CUP' => __('Cuban Peso', 'invoicing'), |
|
52 | + 'CVE' => __('Cape Verdean escudo', 'invoicing'), |
|
53 | + 'CZK' => __('Czech Koruna', 'invoicing'), |
|
54 | + 'DJF' => __('Djiboutian Franc', 'invoicing'), |
|
55 | + 'DKK' => __('Danish Krone', 'invoicing'), |
|
56 | + 'DOP' => __('Dominican Peso', 'invoicing'), |
|
57 | + 'DZD' => __('Algerian Dinar', 'invoicing'), |
|
58 | + 'EGP' => __('Egyptian Pound', 'invoicing'), |
|
59 | + 'ERN' => __('Eritrean Nakfa', 'invoicing'), |
|
60 | + 'ETB' => __('Ethiopian Irr', 'invoicing'), |
|
61 | + 'FJD' => __('Fijian Dollar', 'invoicing'), |
|
62 | + 'FKP' => __('Falkland Islands Pound', 'invoicing'), |
|
63 | + 'GEL' => __('Georgian Lari', 'invoicing'), |
|
64 | + 'GGP' => __('Guernsey Pound', 'invoicing'), |
|
65 | + 'GHS' => __('Ghana Cedi', 'invoicing'), |
|
66 | + 'GIP' => __('Gibraltar Pound', 'invoicing'), |
|
67 | + 'GMD' => __('Gambian Dalasi', 'invoicing'), |
|
68 | + 'GNF' => __('Guinean Franc', 'invoicing'), |
|
69 | + 'GTQ' => __('Guatemalan Quetzal', 'invoicing'), |
|
70 | + 'GYD' => __('Guyanese Dollar', 'invoicing'), |
|
71 | + 'HKD' => __('Hong Kong Dollar', 'invoicing'), |
|
72 | + 'HNL' => __('Honduran Lempira', 'invoicing'), |
|
73 | + 'HRK' => __('Croatian Kuna', 'invoicing'), |
|
74 | + 'HTG' => __('Haitian Gourde', 'invoicing'), |
|
75 | + 'HUF' => __('Hungarian Forint', 'invoicing'), |
|
76 | + 'IDR' => __('Indonesian Rupiah', 'invoicing'), |
|
77 | + 'ILS' => __('Israeli New Shekel', 'invoicing'), |
|
78 | + 'IMP' => __('Manx Pound', 'invoicing'), |
|
79 | + 'INR' => __('Indian Rupee', 'invoicing'), |
|
80 | + 'IQD' => __('Iraqi Dinar', 'invoicing'), |
|
81 | + 'IRR' => __('Iranian Rial', 'invoicing'), |
|
82 | + 'IRT' => __('Iranian Toman', 'invoicing'), |
|
83 | + 'ISK' => __('Icelandic Krona', 'invoicing'), |
|
84 | + 'JEP' => __('Jersey Pound', 'invoicing'), |
|
85 | + 'JMD' => __('Jamaican Dollar', 'invoicing'), |
|
86 | + 'JOD' => __('Jordanian Dinar', 'invoicing'), |
|
87 | + 'JPY' => __('Japanese Yen', 'invoicing'), |
|
88 | + 'KES' => __('Kenyan Shilling', 'invoicing'), |
|
89 | + 'KGS' => __('Kyrgyzstani Som', 'invoicing'), |
|
90 | + 'KHR' => __('Cambodian Riel', 'invoicing'), |
|
91 | + 'KMF' => __('Comorian Franc', 'invoicing'), |
|
92 | + 'KPW' => __('North Korean Won', 'invoicing'), |
|
93 | + 'KRW' => __('South Korean Won', 'invoicing'), |
|
94 | + 'KWD' => __('Kuwaiti Dinar', 'invoicing'), |
|
95 | + 'KYD' => __('Cayman Islands Dollar', 'invoicing'), |
|
96 | + 'KZT' => __('Kazakhstani Tenge', 'invoicing'), |
|
97 | + 'LAK' => __('Lao Kip', 'invoicing'), |
|
98 | + 'LBP' => __('Lebanese Pound', 'invoicing'), |
|
99 | + 'LKR' => __('Sri Lankan Rupee', 'invoicing'), |
|
100 | + 'LRD' => __('Liberian Dollar', 'invoicing'), |
|
101 | + 'LSL' => __('Lesotho Loti', 'invoicing'), |
|
102 | + 'LYD' => __('Libyan Dinar', 'invoicing'), |
|
103 | + 'MAD' => __('Moroccan Dirham', 'invoicing'), |
|
104 | + 'MDL' => __('Moldovan Leu', 'invoicing'), |
|
105 | + 'MGA' => __('Malagasy Ariary', 'invoicing'), |
|
106 | + 'MKD' => __('Macedonian Denar', 'invoicing'), |
|
107 | + 'MMK' => __('Burmese Kyat', 'invoicing'), |
|
108 | + 'MNT' => __('Mongolian Tughrik', 'invoicing'), |
|
109 | + 'MOP' => __('Macanese Pataca', 'invoicing'), |
|
110 | + 'MRO' => __('Mauritanian Ouguiya', 'invoicing'), |
|
111 | + 'MUR' => __('Mauritian Rupee', 'invoicing'), |
|
112 | + 'MVR' => __('Maldivian Rufiyaa', 'invoicing'), |
|
113 | + 'MWK' => __('Malawian Kwacha', 'invoicing'), |
|
114 | + 'MXN' => __('Mexican Peso', 'invoicing'), |
|
115 | + 'MYR' => __('Malaysian Ringgit', 'invoicing'), |
|
116 | + 'MZN' => __('Mozambican Metical', 'invoicing'), |
|
117 | + 'NAD' => __('Namibian Dollar', 'invoicing'), |
|
118 | + 'NGN' => __('Nigerian Naira', 'invoicing'), |
|
119 | + 'NIO' => __('Nicaraguan Cordoba', 'invoicing'), |
|
120 | + 'NOK' => __('Norwegian Krone', 'invoicing'), |
|
121 | + 'NPR' => __('Nepalese Rupee', 'invoicing'), |
|
122 | + 'NZD' => __('New Zealand Dollar', 'invoicing'), |
|
123 | + 'OMR' => __('Omani Rial', 'invoicing'), |
|
124 | + 'PAB' => __('Panamanian Balboa', 'invoicing'), |
|
125 | + 'PEN' => __('Peruvian Nuevo Sol', 'invoicing'), |
|
126 | + 'PGK' => __('Papua New Guinean Kina', 'invoicing'), |
|
127 | + 'PHP' => __('Philippine Peso', 'invoicing'), |
|
128 | + 'PKR' => __('Pakistani Rupee', 'invoicing'), |
|
129 | + 'PLN' => __('Polish Zloty', 'invoicing'), |
|
130 | + 'PRB' => __('Transnistrian Ruble', 'invoicing'), |
|
131 | + 'PYG' => __('Paraguayan Guarani', 'invoicing'), |
|
132 | + 'QAR' => __('Qatari Riyal', 'invoicing'), |
|
133 | + 'RON' => __('Romanian Leu', 'invoicing'), |
|
134 | + 'RSD' => __('Serbian Dinar', 'invoicing'), |
|
135 | + 'RUB' => __('Russian Ruble', 'invoicing'), |
|
136 | + 'RWF' => __('Rwandan Franc', 'invoicing'), |
|
137 | + 'SAR' => __('Saudi Riyal', 'invoicing'), |
|
138 | + 'SBD' => __('Solomon Islands Dollar', 'invoicing'), |
|
139 | + 'SCR' => __('Seychellois Rupee', 'invoicing'), |
|
140 | + 'SDG' => __('Sudanese Pound', 'invoicing'), |
|
141 | + 'SEK' => __('Swedish Krona', 'invoicing'), |
|
142 | + 'SGD' => __('Singapore Dollar', 'invoicing'), |
|
143 | + 'SHP' => __('Saint Helena Pound', 'invoicing'), |
|
144 | + 'SLL' => __('Sierra Leonean Leone', 'invoicing'), |
|
145 | + 'SOS' => __('Somali Shilling', 'invoicing'), |
|
146 | + 'SRD' => __('Surinamese Dollar', 'invoicing'), |
|
147 | + 'SSP' => __('South Sudanese Pound', 'invoicing'), |
|
148 | + 'STD' => __('Sao Tomean Dobra', 'invoicing'), |
|
149 | + 'SYP' => __('Syrian Pound', 'invoicing'), |
|
150 | + 'SZL' => __('Swazi Lilangeni', 'invoicing'), |
|
151 | + 'THB' => __('Thai Baht', 'invoicing'), |
|
152 | + 'TJS' => __('Tajikistani Somoni', 'invoicing'), |
|
153 | + 'TMT' => __('Turkmenistan Manat', 'invoicing'), |
|
154 | + 'TND' => __('Tunisian Dinar', 'invoicing'), |
|
155 | + 'TOP' => __('Tongan Paʻanga', 'invoicing'), |
|
156 | + 'TRY' => __('Turkish Lira', 'invoicing'), |
|
157 | + 'TTD' => __('Trinidad and Tobago Dollar', 'invoicing'), |
|
158 | + 'TWD' => __('New Taiwan Dollar', 'invoicing'), |
|
159 | + 'TZS' => __('Tanzanian Shilling', 'invoicing'), |
|
160 | + 'UAH' => __('Ukrainian Hryvnia', 'invoicing'), |
|
161 | + 'UGX' => __('Ugandan Shilling', 'invoicing'), |
|
162 | + 'UYU' => __('Uruguayan Peso', 'invoicing'), |
|
163 | + 'UZS' => __('Uzbekistani Som', 'invoicing'), |
|
164 | + 'VEF' => __('Venezuelan Bolívar', 'invoicing'), |
|
165 | + 'VND' => __('Vietnamese Dong', 'invoicing'), |
|
166 | + 'VUV' => __('Vanuatu Vatu', 'invoicing'), |
|
167 | + 'WST' => __('Samoan Tala', 'invoicing'), |
|
168 | + 'XAF' => __('Central African CFA Franc', 'invoicing'), |
|
169 | + 'XCD' => __('East Caribbean Dollar', 'invoicing'), |
|
170 | + 'XOF' => __('West African CFA Franc', 'invoicing'), |
|
171 | + 'XPF' => __('CFP Franc', 'invoicing'), |
|
172 | + 'YER' => __('Yemeni Rial', 'invoicing'), |
|
173 | + 'ZAR' => __('South African Rand', 'invoicing'), |
|
174 | + 'ZMW' => __('Zambian Kwacha', 'invoicing'), |
|
175 | 175 | ); |
@@ -15,172 +15,172 @@ |
||
15 | 15 | class WPInv_REST_Items_Controller extends GetPaid_REST_Posts_Controller { |
16 | 16 | |
17 | 17 | /** |
18 | - * Post type. |
|
19 | - * |
|
20 | - * @var string |
|
21 | - */ |
|
22 | - protected $post_type = 'wpi_item'; |
|
18 | + * Post type. |
|
19 | + * |
|
20 | + * @var string |
|
21 | + */ |
|
22 | + protected $post_type = 'wpi_item'; |
|
23 | 23 | |
24 | - /** |
|
25 | - * The base of this controller's route. |
|
26 | - * |
|
27 | - * @since 1.0.13 |
|
28 | - * @var string |
|
29 | - */ |
|
30 | - protected $rest_base = 'items'; |
|
31 | - |
|
32 | - /** Contains this controller's class name. |
|
33 | - * |
|
34 | - * @var string |
|
35 | - */ |
|
36 | - public $crud_class = 'WPInv_Item'; |
|
37 | - |
|
38 | - /** |
|
39 | - * Registers the routes for the objects of the controller. |
|
40 | - * |
|
41 | - * @since 1.0.19 |
|
42 | - * |
|
43 | - * @see register_rest_route() |
|
44 | - */ |
|
45 | - public function register_namespace_routes( $namespace ) { |
|
46 | - |
|
47 | - parent::register_namespace_routes( $namespace ); |
|
48 | - |
|
49 | - register_rest_route( |
|
50 | - $this->namespace, |
|
51 | - '/' . $this->rest_base . '/item-types', |
|
52 | - array( |
|
53 | - array( |
|
54 | - 'methods' => WP_REST_Server::READABLE, |
|
55 | - 'callback' => array( $this, 'get_item_types' ), |
|
56 | - 'permission_callback' => array( $this, 'get_items_permissions_check' ), |
|
57 | - ), |
|
58 | - ) |
|
59 | - ); |
|
60 | - |
|
61 | - } |
|
62 | - |
|
63 | - /** |
|
64 | - * Handles rest requests for item types. |
|
65 | - * |
|
66 | - * @since 1.0.13 |
|
67 | - * |
|
68 | - * |
|
69 | - * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. |
|
70 | - */ |
|
71 | - public function get_item_types() { |
|
72 | - return rest_ensure_response( wpinv_get_item_types() ); |
|
73 | - } |
|
24 | + /** |
|
25 | + * The base of this controller's route. |
|
26 | + * |
|
27 | + * @since 1.0.13 |
|
28 | + * @var string |
|
29 | + */ |
|
30 | + protected $rest_base = 'items'; |
|
31 | + |
|
32 | + /** Contains this controller's class name. |
|
33 | + * |
|
34 | + * @var string |
|
35 | + */ |
|
36 | + public $crud_class = 'WPInv_Item'; |
|
37 | + |
|
38 | + /** |
|
39 | + * Registers the routes for the objects of the controller. |
|
40 | + * |
|
41 | + * @since 1.0.19 |
|
42 | + * |
|
43 | + * @see register_rest_route() |
|
44 | + */ |
|
45 | + public function register_namespace_routes( $namespace ) { |
|
46 | + |
|
47 | + parent::register_namespace_routes( $namespace ); |
|
48 | + |
|
49 | + register_rest_route( |
|
50 | + $this->namespace, |
|
51 | + '/' . $this->rest_base . '/item-types', |
|
52 | + array( |
|
53 | + array( |
|
54 | + 'methods' => WP_REST_Server::READABLE, |
|
55 | + 'callback' => array( $this, 'get_item_types' ), |
|
56 | + 'permission_callback' => array( $this, 'get_items_permissions_check' ), |
|
57 | + ), |
|
58 | + ) |
|
59 | + ); |
|
60 | + |
|
61 | + } |
|
62 | + |
|
63 | + /** |
|
64 | + * Handles rest requests for item types. |
|
65 | + * |
|
66 | + * @since 1.0.13 |
|
67 | + * |
|
68 | + * |
|
69 | + * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. |
|
70 | + */ |
|
71 | + public function get_item_types() { |
|
72 | + return rest_ensure_response( wpinv_get_item_types() ); |
|
73 | + } |
|
74 | + |
|
75 | + /** |
|
76 | + * Retrieves the query params for the items collection. |
|
77 | + * |
|
78 | + * @since 1.0.13 |
|
79 | + * |
|
80 | + * @return array Collection parameters. |
|
81 | + */ |
|
82 | + public function get_collection_params() { |
|
83 | + |
|
84 | + $params = array_merge( |
|
85 | + |
|
86 | + parent::get_collection_params(), |
|
87 | + |
|
88 | + array( |
|
89 | + |
|
90 | + // Item types |
|
91 | + 'type' => array( |
|
92 | + 'description' => __( 'Type of items to fetch.', 'invoicing' ), |
|
93 | + 'type' => array( 'array', 'string' ), |
|
94 | + 'default' => 'any', |
|
95 | + 'validate_callback' => 'rest_validate_request_arg', |
|
96 | + 'sanitize_callback' => 'wpinv_parse_list', |
|
97 | + 'items' => array( |
|
98 | + 'enum' => array_merge( array( 'any' ), wpinv_item_types() ), |
|
99 | + 'type' => 'string', |
|
100 | + ), |
|
101 | + ), |
|
102 | + |
|
103 | + ) |
|
104 | + ); |
|
105 | + |
|
106 | + // Filter collection parameters for the items controller. |
|
107 | + return apply_filters( 'getpaid_rest_items_collection_params', $params, $this ); |
|
108 | + |
|
109 | + } |
|
110 | + |
|
111 | + /** |
|
112 | + * Determine the allowed query_vars for a get_items() response and |
|
113 | + * prepare for WP_Query. |
|
114 | + * |
|
115 | + * @param array $prepared_args Prepared arguments. |
|
116 | + * @param WP_REST_Request $request Request object. |
|
117 | + * @return array $query_args |
|
118 | + */ |
|
119 | + protected function prepare_items_query( $prepared_args = array(), $request = null ) { |
|
120 | + |
|
121 | + $query_args = parent::prepare_items_query( $prepared_args ); |
|
122 | + |
|
123 | + // Retrieve items by type. |
|
124 | + if ( ! in_array( 'any', $request['type'] ) ) { |
|
125 | + |
|
126 | + if ( empty( $query_args['meta_query'] ) ) { |
|
127 | + $query_args['meta_query'] = array(); |
|
128 | + } |
|
129 | + |
|
130 | + $query_args['meta_query'][] = array( |
|
131 | + 'key' => '_wpinv_type', |
|
132 | + 'value' => implode( ',', $request['type'] ), |
|
133 | + 'compare' => 'IN', |
|
134 | + ); |
|
135 | + |
|
136 | + } |
|
137 | + |
|
138 | + return apply_filters( 'getpaid_rest_items_prepare_items_query', $query_args, $request, $this ); |
|
139 | + |
|
140 | + } |
|
141 | + |
|
142 | + /** |
|
143 | + * Retrieves a valid list of post statuses. |
|
144 | + * |
|
145 | + * @since 1.0.15 |
|
146 | + * |
|
147 | + * @return array A list of registered item statuses. |
|
148 | + */ |
|
149 | + public function get_post_statuses() { |
|
150 | + return array( 'draft', 'pending', 'publish' ); |
|
151 | + } |
|
74 | 152 | |
75 | 153 | /** |
76 | - * Retrieves the query params for the items collection. |
|
77 | - * |
|
78 | - * @since 1.0.13 |
|
79 | - * |
|
80 | - * @return array Collection parameters. |
|
81 | - */ |
|
82 | - public function get_collection_params() { |
|
83 | - |
|
84 | - $params = array_merge( |
|
85 | - |
|
86 | - parent::get_collection_params(), |
|
87 | - |
|
88 | - array( |
|
89 | - |
|
90 | - // Item types |
|
91 | - 'type' => array( |
|
92 | - 'description' => __( 'Type of items to fetch.', 'invoicing' ), |
|
93 | - 'type' => array( 'array', 'string' ), |
|
94 | - 'default' => 'any', |
|
95 | - 'validate_callback' => 'rest_validate_request_arg', |
|
96 | - 'sanitize_callback' => 'wpinv_parse_list', |
|
97 | - 'items' => array( |
|
98 | - 'enum' => array_merge( array( 'any' ), wpinv_item_types() ), |
|
99 | - 'type' => 'string', |
|
100 | - ), |
|
101 | - ), |
|
102 | - |
|
103 | - ) |
|
104 | - ); |
|
105 | - |
|
106 | - // Filter collection parameters for the items controller. |
|
107 | - return apply_filters( 'getpaid_rest_items_collection_params', $params, $this ); |
|
108 | - |
|
109 | - } |
|
110 | - |
|
111 | - /** |
|
112 | - * Determine the allowed query_vars for a get_items() response and |
|
113 | - * prepare for WP_Query. |
|
114 | - * |
|
115 | - * @param array $prepared_args Prepared arguments. |
|
116 | - * @param WP_REST_Request $request Request object. |
|
117 | - * @return array $query_args |
|
118 | - */ |
|
119 | - protected function prepare_items_query( $prepared_args = array(), $request = null ) { |
|
120 | - |
|
121 | - $query_args = parent::prepare_items_query( $prepared_args ); |
|
122 | - |
|
123 | - // Retrieve items by type. |
|
124 | - if ( ! in_array( 'any', $request['type'] ) ) { |
|
125 | - |
|
126 | - if ( empty( $query_args['meta_query'] ) ) { |
|
127 | - $query_args['meta_query'] = array(); |
|
128 | - } |
|
129 | - |
|
130 | - $query_args['meta_query'][] = array( |
|
131 | - 'key' => '_wpinv_type', |
|
132 | - 'value' => implode( ',', $request['type'] ), |
|
133 | - 'compare' => 'IN', |
|
134 | - ); |
|
135 | - |
|
136 | - } |
|
137 | - |
|
138 | - return apply_filters( 'getpaid_rest_items_prepare_items_query', $query_args, $request, $this ); |
|
139 | - |
|
140 | - } |
|
141 | - |
|
142 | - /** |
|
143 | - * Retrieves a valid list of post statuses. |
|
144 | - * |
|
145 | - * @since 1.0.15 |
|
146 | - * |
|
147 | - * @return array A list of registered item statuses. |
|
148 | - */ |
|
149 | - public function get_post_statuses() { |
|
150 | - return array( 'draft', 'pending', 'publish' ); |
|
151 | - } |
|
152 | - |
|
153 | - /** |
|
154 | - * Checks if a key should be included in a response. |
|
155 | - * |
|
156 | - * @since 1.0.19 |
|
157 | - * @param WPInv_Item $item Item object. |
|
158 | - * @param string $field_key The key to check for. |
|
159 | - * @return bool |
|
160 | - */ |
|
161 | - public function object_supports_field( $item, $field_key ) { |
|
162 | - |
|
163 | - if ( 'minimum_price' == $field_key && ! $item->user_can_set_their_price() ) { |
|
164 | - return false; |
|
165 | - } |
|
166 | - |
|
167 | - foreach( wpinv_parse_list( 'initial_price the_initial_price recurring_price the_recurring_price recurring_period recurring_interval recurring_limit is_free_trial trial_period trial_interval first_renewal_date' ) as $key ) { |
|
168 | - |
|
169 | - if ( $key == $field_key && ! $item->is_recurring() ) { |
|
170 | - return false; |
|
171 | - } |
|
172 | - |
|
173 | - } |
|
174 | - |
|
175 | - foreach( wpinv_parse_list( 'trial_period trial_interval' ) as $key ) { |
|
176 | - |
|
177 | - if ( $key == $field_key && ! $item->has_free_trial() ) { |
|
178 | - return false; |
|
179 | - } |
|
180 | - |
|
181 | - } |
|
154 | + * Checks if a key should be included in a response. |
|
155 | + * |
|
156 | + * @since 1.0.19 |
|
157 | + * @param WPInv_Item $item Item object. |
|
158 | + * @param string $field_key The key to check for. |
|
159 | + * @return bool |
|
160 | + */ |
|
161 | + public function object_supports_field( $item, $field_key ) { |
|
162 | + |
|
163 | + if ( 'minimum_price' == $field_key && ! $item->user_can_set_their_price() ) { |
|
164 | + return false; |
|
165 | + } |
|
166 | + |
|
167 | + foreach( wpinv_parse_list( 'initial_price the_initial_price recurring_price the_recurring_price recurring_period recurring_interval recurring_limit is_free_trial trial_period trial_interval first_renewal_date' ) as $key ) { |
|
168 | + |
|
169 | + if ( $key == $field_key && ! $item->is_recurring() ) { |
|
170 | + return false; |
|
171 | + } |
|
172 | + |
|
173 | + } |
|
174 | + |
|
175 | + foreach( wpinv_parse_list( 'trial_period trial_interval' ) as $key ) { |
|
176 | + |
|
177 | + if ( $key == $field_key && ! $item->has_free_trial() ) { |
|
178 | + return false; |
|
179 | + } |
|
180 | + |
|
181 | + } |
|
182 | 182 | |
183 | - return parent::object_supports_field( $item, $field_key ); |
|
184 | - } |
|
183 | + return parent::object_supports_field( $item, $field_key ); |
|
184 | + } |
|
185 | 185 | |
186 | 186 | } |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * @version 1.0.19 |
6 | 6 | */ |
7 | 7 | |
8 | -defined( 'ABSPATH' ) || exit; |
|
8 | +defined('ABSPATH') || exit; |
|
9 | 9 | |
10 | 10 | /** |
11 | 11 | * REST API items controller class. |
@@ -42,9 +42,9 @@ discard block |
||
42 | 42 | * |
43 | 43 | * @see register_rest_route() |
44 | 44 | */ |
45 | - public function register_namespace_routes( $namespace ) { |
|
45 | + public function register_namespace_routes($namespace) { |
|
46 | 46 | |
47 | - parent::register_namespace_routes( $namespace ); |
|
47 | + parent::register_namespace_routes($namespace); |
|
48 | 48 | |
49 | 49 | register_rest_route( |
50 | 50 | $this->namespace, |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | array( |
53 | 53 | array( |
54 | 54 | 'methods' => WP_REST_Server::READABLE, |
55 | - 'callback' => array( $this, 'get_item_types' ), |
|
56 | - 'permission_callback' => array( $this, 'get_items_permissions_check' ), |
|
55 | + 'callback' => array($this, 'get_item_types'), |
|
56 | + 'permission_callback' => array($this, 'get_items_permissions_check'), |
|
57 | 57 | ), |
58 | 58 | ) |
59 | 59 | ); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. |
70 | 70 | */ |
71 | 71 | public function get_item_types() { |
72 | - return rest_ensure_response( wpinv_get_item_types() ); |
|
72 | + return rest_ensure_response(wpinv_get_item_types()); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
@@ -89,13 +89,13 @@ discard block |
||
89 | 89 | |
90 | 90 | // Item types |
91 | 91 | 'type' => array( |
92 | - 'description' => __( 'Type of items to fetch.', 'invoicing' ), |
|
93 | - 'type' => array( 'array', 'string' ), |
|
92 | + 'description' => __('Type of items to fetch.', 'invoicing'), |
|
93 | + 'type' => array('array', 'string'), |
|
94 | 94 | 'default' => 'any', |
95 | 95 | 'validate_callback' => 'rest_validate_request_arg', |
96 | 96 | 'sanitize_callback' => 'wpinv_parse_list', |
97 | 97 | 'items' => array( |
98 | - 'enum' => array_merge( array( 'any' ), wpinv_item_types() ), |
|
98 | + 'enum' => array_merge(array('any'), wpinv_item_types()), |
|
99 | 99 | 'type' => 'string', |
100 | 100 | ), |
101 | 101 | ), |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | ); |
105 | 105 | |
106 | 106 | // Filter collection parameters for the items controller. |
107 | - return apply_filters( 'getpaid_rest_items_collection_params', $params, $this ); |
|
107 | + return apply_filters('getpaid_rest_items_collection_params', $params, $this); |
|
108 | 108 | |
109 | 109 | } |
110 | 110 | |
@@ -116,26 +116,26 @@ discard block |
||
116 | 116 | * @param WP_REST_Request $request Request object. |
117 | 117 | * @return array $query_args |
118 | 118 | */ |
119 | - protected function prepare_items_query( $prepared_args = array(), $request = null ) { |
|
119 | + protected function prepare_items_query($prepared_args = array(), $request = null) { |
|
120 | 120 | |
121 | - $query_args = parent::prepare_items_query( $prepared_args ); |
|
121 | + $query_args = parent::prepare_items_query($prepared_args); |
|
122 | 122 | |
123 | 123 | // Retrieve items by type. |
124 | - if ( ! in_array( 'any', $request['type'] ) ) { |
|
124 | + if (!in_array('any', $request['type'])) { |
|
125 | 125 | |
126 | - if ( empty( $query_args['meta_query'] ) ) { |
|
126 | + if (empty($query_args['meta_query'])) { |
|
127 | 127 | $query_args['meta_query'] = array(); |
128 | 128 | } |
129 | 129 | |
130 | 130 | $query_args['meta_query'][] = array( |
131 | 131 | 'key' => '_wpinv_type', |
132 | - 'value' => implode( ',', $request['type'] ), |
|
132 | + 'value' => implode(',', $request['type']), |
|
133 | 133 | 'compare' => 'IN', |
134 | 134 | ); |
135 | 135 | |
136 | 136 | } |
137 | 137 | |
138 | - return apply_filters( 'getpaid_rest_items_prepare_items_query', $query_args, $request, $this ); |
|
138 | + return apply_filters('getpaid_rest_items_prepare_items_query', $query_args, $request, $this); |
|
139 | 139 | |
140 | 140 | } |
141 | 141 | |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | * @return array A list of registered item statuses. |
148 | 148 | */ |
149 | 149 | public function get_post_statuses() { |
150 | - return array( 'draft', 'pending', 'publish' ); |
|
150 | + return array('draft', 'pending', 'publish'); |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | /** |
@@ -158,29 +158,29 @@ discard block |
||
158 | 158 | * @param string $field_key The key to check for. |
159 | 159 | * @return bool |
160 | 160 | */ |
161 | - public function object_supports_field( $item, $field_key ) { |
|
161 | + public function object_supports_field($item, $field_key) { |
|
162 | 162 | |
163 | - if ( 'minimum_price' == $field_key && ! $item->user_can_set_their_price() ) { |
|
163 | + if ('minimum_price' == $field_key && !$item->user_can_set_their_price()) { |
|
164 | 164 | return false; |
165 | 165 | } |
166 | 166 | |
167 | - foreach( wpinv_parse_list( 'initial_price the_initial_price recurring_price the_recurring_price recurring_period recurring_interval recurring_limit is_free_trial trial_period trial_interval first_renewal_date' ) as $key ) { |
|
167 | + foreach (wpinv_parse_list('initial_price the_initial_price recurring_price the_recurring_price recurring_period recurring_interval recurring_limit is_free_trial trial_period trial_interval first_renewal_date') as $key) { |
|
168 | 168 | |
169 | - if ( $key == $field_key && ! $item->is_recurring() ) { |
|
169 | + if ($key == $field_key && !$item->is_recurring()) { |
|
170 | 170 | return false; |
171 | 171 | } |
172 | 172 | |
173 | 173 | } |
174 | 174 | |
175 | - foreach( wpinv_parse_list( 'trial_period trial_interval' ) as $key ) { |
|
175 | + foreach (wpinv_parse_list('trial_period trial_interval') as $key) { |
|
176 | 176 | |
177 | - if ( $key == $field_key && ! $item->has_free_trial() ) { |
|
177 | + if ($key == $field_key && !$item->has_free_trial()) { |
|
178 | 178 | return false; |
179 | 179 | } |
180 | 180 | |
181 | 181 | } |
182 | 182 | |
183 | - return parent::object_supports_field( $item, $field_key ); |
|
183 | + return parent::object_supports_field($item, $field_key); |
|
184 | 184 | } |
185 | 185 | |
186 | 186 | } |
@@ -15,138 +15,138 @@ |
||
15 | 15 | class WPInv_REST_Discounts_Controller extends GetPaid_REST_Posts_Controller { |
16 | 16 | |
17 | 17 | /** |
18 | - * Post type. |
|
19 | - * |
|
20 | - * @var string |
|
21 | - */ |
|
22 | - protected $post_type = 'wpi_discount'; |
|
23 | - |
|
24 | - /** |
|
25 | - * The base of this controller's route. |
|
26 | - * |
|
27 | - * @since 1.0.13 |
|
28 | - * @var string |
|
29 | - */ |
|
30 | - protected $rest_base = 'discounts'; |
|
31 | - |
|
32 | - /** Contains this controller's class name. |
|
33 | - * |
|
34 | - * @var string |
|
35 | - */ |
|
36 | - public $crud_class = 'WPInv_Discount'; |
|
37 | - |
|
38 | - /** |
|
39 | - * Registers the routes for the objects of the controller. |
|
40 | - * |
|
41 | - * @since 1.0.19 |
|
42 | - * |
|
43 | - * @see register_rest_route() |
|
44 | - */ |
|
45 | - public function register_namespace_routes( $namespace ) { |
|
46 | - |
|
47 | - parent::register_namespace_routes( $namespace ); |
|
48 | - |
|
49 | - register_rest_route( |
|
50 | - $this->namespace, |
|
51 | - '/' . $this->rest_base . '/discount-types', |
|
52 | - array( |
|
53 | - array( |
|
54 | - 'methods' => WP_REST_Server::READABLE, |
|
55 | - 'callback' => array( $this, 'get_discount_types' ), |
|
56 | - 'permission_callback' => array( $this, 'get_items_permissions_check' ), |
|
57 | - ), |
|
58 | - ) |
|
59 | - ); |
|
60 | - |
|
61 | - } |
|
62 | - |
|
63 | - /** |
|
64 | - * Handles rest requests for discount types. |
|
65 | - * |
|
66 | - * @since 1.0.13 |
|
67 | - * |
|
68 | - * |
|
69 | - * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. |
|
70 | - */ |
|
71 | - public function get_discount_types() { |
|
72 | - return rest_ensure_response( wpinv_get_discount_types() ); |
|
73 | - } |
|
18 | + * Post type. |
|
19 | + * |
|
20 | + * @var string |
|
21 | + */ |
|
22 | + protected $post_type = 'wpi_discount'; |
|
74 | 23 | |
75 | 24 | /** |
76 | - * Retrieves the query params for the discount collection. |
|
77 | - * |
|
78 | - * @since 1.0.13 |
|
79 | - * |
|
80 | - * @return array Collection parameters. |
|
81 | - */ |
|
82 | - public function get_collection_params() { |
|
83 | - |
|
84 | - $params = array_merge( |
|
85 | - |
|
86 | - parent::get_collection_params(), |
|
87 | - |
|
88 | - array( |
|
89 | - |
|
90 | - // Discount types |
|
91 | - 'type' => array( |
|
92 | - 'description' => __( 'Type of discounts to fetch.', 'invoicing' ), |
|
93 | - 'type' => array( 'array', 'string' ), |
|
94 | - 'default' => 'any', |
|
95 | - 'validate_callback' => 'rest_validate_request_arg', |
|
96 | - 'sanitize_callback' => 'wpinv_parse_list', |
|
97 | - 'items' => array( |
|
98 | - 'enum' => array_merge( array( 'any' ), array_keys( wpinv_get_discount_types() ) ), |
|
99 | - 'type' => 'string', |
|
100 | - ), |
|
101 | - ), |
|
102 | - |
|
103 | - ) |
|
104 | - ); |
|
105 | - |
|
106 | - // Filter collection parameters for the discounts controller. |
|
107 | - return apply_filters( 'getpaid_rest_discounts_collection_params', $params, $this ); |
|
108 | - } |
|
109 | - |
|
110 | - /** |
|
111 | - * Determine the allowed query_vars for a get_items() response and |
|
112 | - * prepare for WP_Query. |
|
113 | - * |
|
114 | - * @param array $prepared_args Prepared arguments. |
|
115 | - * @param WP_REST_Request $request Request object. |
|
116 | - * @return array $query_args |
|
117 | - */ |
|
118 | - protected function prepare_items_query( $prepared_args = array(), $request = null ) { |
|
119 | - |
|
120 | - $query_args = parent::prepare_items_query( $prepared_args ); |
|
121 | - |
|
122 | - // Retrieve items by type. |
|
123 | - if ( ! in_array( 'any', $request['type'] ) ) { |
|
124 | - |
|
125 | - if ( empty( $query_args['meta_query'] ) ) { |
|
126 | - $query_args['meta_query'] = array(); |
|
127 | - } |
|
128 | - |
|
129 | - $query_args['meta_query'][] = array( |
|
130 | - 'key' => '_wpi_discount_type', |
|
131 | - 'value' => implode( ',', $request['type'] ), |
|
132 | - 'compare' => 'IN', |
|
133 | - ); |
|
134 | - |
|
135 | - } |
|
136 | - |
|
137 | - return apply_filters( 'getpaid_rest_discounts_prepare_items_query', $query_args, $request, $this ); |
|
138 | - |
|
139 | - } |
|
140 | - |
|
141 | - /** |
|
142 | - * Retrieves a valid list of post statuses. |
|
143 | - * |
|
144 | - * @since 1.0.15 |
|
145 | - * |
|
146 | - * @return array A list of registered item statuses. |
|
147 | - */ |
|
148 | - public function get_post_statuses() { |
|
149 | - return array( 'publish', 'pending', 'draft', 'expired' ); |
|
150 | - } |
|
25 | + * The base of this controller's route. |
|
26 | + * |
|
27 | + * @since 1.0.13 |
|
28 | + * @var string |
|
29 | + */ |
|
30 | + protected $rest_base = 'discounts'; |
|
31 | + |
|
32 | + /** Contains this controller's class name. |
|
33 | + * |
|
34 | + * @var string |
|
35 | + */ |
|
36 | + public $crud_class = 'WPInv_Discount'; |
|
37 | + |
|
38 | + /** |
|
39 | + * Registers the routes for the objects of the controller. |
|
40 | + * |
|
41 | + * @since 1.0.19 |
|
42 | + * |
|
43 | + * @see register_rest_route() |
|
44 | + */ |
|
45 | + public function register_namespace_routes( $namespace ) { |
|
46 | + |
|
47 | + parent::register_namespace_routes( $namespace ); |
|
48 | + |
|
49 | + register_rest_route( |
|
50 | + $this->namespace, |
|
51 | + '/' . $this->rest_base . '/discount-types', |
|
52 | + array( |
|
53 | + array( |
|
54 | + 'methods' => WP_REST_Server::READABLE, |
|
55 | + 'callback' => array( $this, 'get_discount_types' ), |
|
56 | + 'permission_callback' => array( $this, 'get_items_permissions_check' ), |
|
57 | + ), |
|
58 | + ) |
|
59 | + ); |
|
60 | + |
|
61 | + } |
|
62 | + |
|
63 | + /** |
|
64 | + * Handles rest requests for discount types. |
|
65 | + * |
|
66 | + * @since 1.0.13 |
|
67 | + * |
|
68 | + * |
|
69 | + * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. |
|
70 | + */ |
|
71 | + public function get_discount_types() { |
|
72 | + return rest_ensure_response( wpinv_get_discount_types() ); |
|
73 | + } |
|
74 | + |
|
75 | + /** |
|
76 | + * Retrieves the query params for the discount collection. |
|
77 | + * |
|
78 | + * @since 1.0.13 |
|
79 | + * |
|
80 | + * @return array Collection parameters. |
|
81 | + */ |
|
82 | + public function get_collection_params() { |
|
83 | + |
|
84 | + $params = array_merge( |
|
85 | + |
|
86 | + parent::get_collection_params(), |
|
87 | + |
|
88 | + array( |
|
89 | + |
|
90 | + // Discount types |
|
91 | + 'type' => array( |
|
92 | + 'description' => __( 'Type of discounts to fetch.', 'invoicing' ), |
|
93 | + 'type' => array( 'array', 'string' ), |
|
94 | + 'default' => 'any', |
|
95 | + 'validate_callback' => 'rest_validate_request_arg', |
|
96 | + 'sanitize_callback' => 'wpinv_parse_list', |
|
97 | + 'items' => array( |
|
98 | + 'enum' => array_merge( array( 'any' ), array_keys( wpinv_get_discount_types() ) ), |
|
99 | + 'type' => 'string', |
|
100 | + ), |
|
101 | + ), |
|
102 | + |
|
103 | + ) |
|
104 | + ); |
|
105 | + |
|
106 | + // Filter collection parameters for the discounts controller. |
|
107 | + return apply_filters( 'getpaid_rest_discounts_collection_params', $params, $this ); |
|
108 | + } |
|
109 | + |
|
110 | + /** |
|
111 | + * Determine the allowed query_vars for a get_items() response and |
|
112 | + * prepare for WP_Query. |
|
113 | + * |
|
114 | + * @param array $prepared_args Prepared arguments. |
|
115 | + * @param WP_REST_Request $request Request object. |
|
116 | + * @return array $query_args |
|
117 | + */ |
|
118 | + protected function prepare_items_query( $prepared_args = array(), $request = null ) { |
|
119 | + |
|
120 | + $query_args = parent::prepare_items_query( $prepared_args ); |
|
121 | + |
|
122 | + // Retrieve items by type. |
|
123 | + if ( ! in_array( 'any', $request['type'] ) ) { |
|
124 | + |
|
125 | + if ( empty( $query_args['meta_query'] ) ) { |
|
126 | + $query_args['meta_query'] = array(); |
|
127 | + } |
|
128 | + |
|
129 | + $query_args['meta_query'][] = array( |
|
130 | + 'key' => '_wpi_discount_type', |
|
131 | + 'value' => implode( ',', $request['type'] ), |
|
132 | + 'compare' => 'IN', |
|
133 | + ); |
|
134 | + |
|
135 | + } |
|
136 | + |
|
137 | + return apply_filters( 'getpaid_rest_discounts_prepare_items_query', $query_args, $request, $this ); |
|
138 | + |
|
139 | + } |
|
140 | + |
|
141 | + /** |
|
142 | + * Retrieves a valid list of post statuses. |
|
143 | + * |
|
144 | + * @since 1.0.15 |
|
145 | + * |
|
146 | + * @return array A list of registered item statuses. |
|
147 | + */ |
|
148 | + public function get_post_statuses() { |
|
149 | + return array( 'publish', 'pending', 'draft', 'expired' ); |
|
150 | + } |
|
151 | 151 | |
152 | 152 | } |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * @version 1.0.19 |
6 | 6 | */ |
7 | 7 | |
8 | -defined( 'ABSPATH' ) || exit; |
|
8 | +defined('ABSPATH') || exit; |
|
9 | 9 | |
10 | 10 | /** |
11 | 11 | * REST API discounts controller class. |
@@ -42,9 +42,9 @@ discard block |
||
42 | 42 | * |
43 | 43 | * @see register_rest_route() |
44 | 44 | */ |
45 | - public function register_namespace_routes( $namespace ) { |
|
45 | + public function register_namespace_routes($namespace) { |
|
46 | 46 | |
47 | - parent::register_namespace_routes( $namespace ); |
|
47 | + parent::register_namespace_routes($namespace); |
|
48 | 48 | |
49 | 49 | register_rest_route( |
50 | 50 | $this->namespace, |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | array( |
53 | 53 | array( |
54 | 54 | 'methods' => WP_REST_Server::READABLE, |
55 | - 'callback' => array( $this, 'get_discount_types' ), |
|
56 | - 'permission_callback' => array( $this, 'get_items_permissions_check' ), |
|
55 | + 'callback' => array($this, 'get_discount_types'), |
|
56 | + 'permission_callback' => array($this, 'get_items_permissions_check'), |
|
57 | 57 | ), |
58 | 58 | ) |
59 | 59 | ); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. |
70 | 70 | */ |
71 | 71 | public function get_discount_types() { |
72 | - return rest_ensure_response( wpinv_get_discount_types() ); |
|
72 | + return rest_ensure_response(wpinv_get_discount_types()); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
@@ -89,13 +89,13 @@ discard block |
||
89 | 89 | |
90 | 90 | // Discount types |
91 | 91 | 'type' => array( |
92 | - 'description' => __( 'Type of discounts to fetch.', 'invoicing' ), |
|
93 | - 'type' => array( 'array', 'string' ), |
|
92 | + 'description' => __('Type of discounts to fetch.', 'invoicing'), |
|
93 | + 'type' => array('array', 'string'), |
|
94 | 94 | 'default' => 'any', |
95 | 95 | 'validate_callback' => 'rest_validate_request_arg', |
96 | 96 | 'sanitize_callback' => 'wpinv_parse_list', |
97 | 97 | 'items' => array( |
98 | - 'enum' => array_merge( array( 'any' ), array_keys( wpinv_get_discount_types() ) ), |
|
98 | + 'enum' => array_merge(array('any'), array_keys(wpinv_get_discount_types())), |
|
99 | 99 | 'type' => 'string', |
100 | 100 | ), |
101 | 101 | ), |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | ); |
105 | 105 | |
106 | 106 | // Filter collection parameters for the discounts controller. |
107 | - return apply_filters( 'getpaid_rest_discounts_collection_params', $params, $this ); |
|
107 | + return apply_filters('getpaid_rest_discounts_collection_params', $params, $this); |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | /** |
@@ -115,26 +115,26 @@ discard block |
||
115 | 115 | * @param WP_REST_Request $request Request object. |
116 | 116 | * @return array $query_args |
117 | 117 | */ |
118 | - protected function prepare_items_query( $prepared_args = array(), $request = null ) { |
|
118 | + protected function prepare_items_query($prepared_args = array(), $request = null) { |
|
119 | 119 | |
120 | - $query_args = parent::prepare_items_query( $prepared_args ); |
|
120 | + $query_args = parent::prepare_items_query($prepared_args); |
|
121 | 121 | |
122 | 122 | // Retrieve items by type. |
123 | - if ( ! in_array( 'any', $request['type'] ) ) { |
|
123 | + if (!in_array('any', $request['type'])) { |
|
124 | 124 | |
125 | - if ( empty( $query_args['meta_query'] ) ) { |
|
125 | + if (empty($query_args['meta_query'])) { |
|
126 | 126 | $query_args['meta_query'] = array(); |
127 | 127 | } |
128 | 128 | |
129 | 129 | $query_args['meta_query'][] = array( |
130 | 130 | 'key' => '_wpi_discount_type', |
131 | - 'value' => implode( ',', $request['type'] ), |
|
131 | + 'value' => implode(',', $request['type']), |
|
132 | 132 | 'compare' => 'IN', |
133 | 133 | ); |
134 | 134 | |
135 | 135 | } |
136 | 136 | |
137 | - return apply_filters( 'getpaid_rest_discounts_prepare_items_query', $query_args, $request, $this ); |
|
137 | + return apply_filters('getpaid_rest_discounts_prepare_items_query', $query_args, $request, $this); |
|
138 | 138 | |
139 | 139 | } |
140 | 140 | |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | * @return array A list of registered item statuses. |
147 | 147 | */ |
148 | 148 | public function get_post_statuses() { |
149 | - return array( 'publish', 'pending', 'draft', 'expired' ); |
|
149 | + return array('publish', 'pending', 'draft', 'expired'); |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | } |