Passed
Branch master (3a0618)
by Stiofan
05:00
created
templates/payment-forms-admin/edit/number.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,44 +7,44 @@
 block discarded – undo
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 14
 <div class='form-group'>
15 15
     <label class="d-block">
16
-        <span><?php esc_html_e( 'Field Label', 'invoicing' ); ?></span>
16
+        <span><?php esc_html_e('Field Label', 'invoicing'); ?></span>
17 17
         <input v-model='active_form_element.label' class='form-control' type="text"/>
18 18
     </label>
19 19
 </div>
20 20
 
21 21
 <div class='form-group'>
22 22
     <label class="d-block">
23
-        <span><?php esc_html_e( 'Placeholder text', 'invoicing' ); ?></span>
23
+        <span><?php esc_html_e('Placeholder text', 'invoicing'); ?></span>
24 24
         <input v-model='active_form_element.placeholder' class='form-control' type="text"/>
25 25
     </label>
26 26
 </div>
27 27
 
28 28
 <div class='form-group'>
29 29
     <label class="d-block">
30
-        <span><?php esc_html_e( 'Help Text', 'invoicing' ); ?></span>
31
-        <textarea placeholder='<?php esc_attr_e( 'Add some help text for this field', 'invoicing' ); ?>' v-model='active_form_element.description' class='form-control' rows='3'></textarea>
32
-        <small class="form-text text-muted"><?php _e( 'HTML is allowed', 'invoicing' ); ?></small>
30
+        <span><?php esc_html_e('Help Text', 'invoicing'); ?></span>
31
+        <textarea placeholder='<?php esc_attr_e('Add some help text for this field', 'invoicing'); ?>' v-model='active_form_element.description' class='form-control' rows='3'></textarea>
32
+        <small class="form-text text-muted"><?php _e('HTML is allowed', 'invoicing'); ?></small>
33 33
     </label>
34 34
 </div>
35 35
 
36 36
 <div class='form-group form-check'>
37 37
     <input :id="active_form_element.id + '_edit'" v-model='active_form_element.required' type='checkbox' class='form-check-input' />
38
-    <label class='form-check-label' :for="active_form_element.id + '_edit'"><?php esc_html_e( 'Is this field required?', 'invoicing' ); ?></label>
38
+    <label class='form-check-label' :for="active_form_element.id + '_edit'"><?php esc_html_e('Is this field required?', 'invoicing'); ?></label>
39 39
 </div>
40 40
 
41 41
 <hr class='featurette-divider mt-4'>
42 42
 
43 43
 <div class='form-group'>
44 44
     <label class="d-block">
45
-        <span><?php esc_html_e( 'Email Merge Tag', 'invoicing' ); ?></span>
45
+        <span><?php esc_html_e('Email Merge Tag', 'invoicing'); ?></span>
46 46
         <input :value='active_form_element.label | formatMergeTag' class='form-control bg-white' type="text" readonly onclick="this.select()" />
47
-        <span class="form-text text-muted"><?php esc_html_e( 'You can use this merge tag in notification emails', 'invoicing' ); ?></span>
47
+        <span class="form-text text-muted"><?php esc_html_e('You can use this merge tag in notification emails', 'invoicing'); ?></span>
48 48
     </label>
49 49
 </div>
50 50
 
Please login to merge, or discard this patch.
templates/payment-forms-admin/edit/textarea.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,44 +7,44 @@
 block discarded – undo
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 14
 <div class='form-group'>
15 15
     <label class="d-block">
16
-        <span><?php esc_html_e( 'Field Label', 'invoicing' ); ?></span>
16
+        <span><?php esc_html_e('Field Label', 'invoicing'); ?></span>
17 17
         <input v-model='active_form_element.label' class='form-control' type="text"/>
18 18
     </label>
19 19
 </div>
20 20
 
21 21
 <div class='form-group'>
22 22
     <label class="d-block">
23
-        <span><?php esc_html_e( 'Placeholder text', 'invoicing' ); ?></span>
23
+        <span><?php esc_html_e('Placeholder text', 'invoicing'); ?></span>
24 24
         <input v-model='active_form_element.placeholder' class='form-control' type="text"/>
25 25
     </label>
26 26
 </div>
27 27
 
28 28
 <div class='form-group'>
29 29
     <label class="d-block">
30
-        <span><?php esc_html_e( 'Help Text', 'invoicing' ); ?></span>
31
-        <textarea placeholder='<?php esc_attr_e( 'Add some help text for this field', 'invoicing' ); ?>' v-model='active_form_element.description' class='form-control' rows='3'></textarea>
32
-        <small class="form-text text-muted"><?php _e( 'HTML is allowed', 'invoicing' ); ?></small>
30
+        <span><?php esc_html_e('Help Text', 'invoicing'); ?></span>
31
+        <textarea placeholder='<?php esc_attr_e('Add some help text for this field', 'invoicing'); ?>' v-model='active_form_element.description' class='form-control' rows='3'></textarea>
32
+        <small class="form-text text-muted"><?php _e('HTML is allowed', 'invoicing'); ?></small>
33 33
     </label>
34 34
 </div>
35 35
 
36 36
 <div class='form-group form-check'>
37 37
     <input :id="active_form_element.id + '_edit'" v-model='active_form_element.required' type='checkbox' class='form-check-input' />
38
-    <label class='form-check-label' :for="active_form_element.id + '_edit'"><?php esc_html_e( 'Is this field required?', 'invoicing' ); ?></label>
38
+    <label class='form-check-label' :for="active_form_element.id + '_edit'"><?php esc_html_e('Is this field required?', 'invoicing'); ?></label>
39 39
 </div>
40 40
 
41 41
 <hr class='featurette-divider mt-4'>
42 42
 
43 43
 <div class='form-group'>
44 44
     <label class="d-block">
45
-        <span><?php esc_html_e( 'Email Merge Tag', 'invoicing' ); ?></span>
45
+        <span><?php esc_html_e('Email Merge Tag', 'invoicing'); ?></span>
46 46
         <input :value='active_form_element.label | formatMergeTag' class='form-control bg-white' type="text" readonly onclick="this.select()" />
47
-        <span class="form-text text-muted"><?php esc_html_e( 'You can use this merge tag in notification emails', 'invoicing' ); ?></span>
47
+        <span class="form-text text-muted"><?php esc_html_e('You can use this merge tag in notification emails', 'invoicing'); ?></span>
48 48
     </label>
49 49
 </div>
50 50
 
Please login to merge, or discard this patch.
templates/payment-forms-admin/edit/text.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,44 +7,44 @@
 block discarded – undo
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 14
 <div class='form-group'>
15 15
     <label class="d-block">
16
-        <span><?php esc_html_e( 'Field Label', 'invoicing' ); ?></span>
16
+        <span><?php esc_html_e('Field Label', 'invoicing'); ?></span>
17 17
         <input v-model='active_form_element.label' class='form-control' type="text"/>
18 18
     </label>
19 19
 </div>
20 20
 
21 21
 <div class='form-group'>
22 22
     <label class="d-block">
23
-        <span><?php esc_html_e( 'Placeholder text', 'invoicing' ); ?></span>
23
+        <span><?php esc_html_e('Placeholder text', 'invoicing'); ?></span>
24 24
         <input v-model='active_form_element.placeholder' class='form-control' type="text"/>
25 25
     </label>
26 26
 </div>
27 27
 
28 28
 <div class='form-group'>
29 29
     <label class="d-block">
30
-        <span><?php esc_html_e( 'Help Text', 'invoicing' ); ?></span>
31
-        <textarea placeholder='<?php esc_attr_e( 'Add some help text for this field', 'invoicing' ); ?>' v-model='active_form_element.description' class='form-control' rows='3'></textarea>
32
-        <small class="form-text text-muted"><?php _e( 'HTML is allowed', 'invoicing' ); ?></small>
30
+        <span><?php esc_html_e('Help Text', 'invoicing'); ?></span>
31
+        <textarea placeholder='<?php esc_attr_e('Add some help text for this field', 'invoicing'); ?>' v-model='active_form_element.description' class='form-control' rows='3'></textarea>
32
+        <small class="form-text text-muted"><?php _e('HTML is allowed', 'invoicing'); ?></small>
33 33
     </label>
34 34
 </div>
35 35
 
36 36
 <div class='form-group form-check'>
37 37
     <input :id="active_form_element.id + '_edit'" v-model='active_form_element.required' type='checkbox' class='form-check-input' />
38
-    <label class='form-check-label' :for="active_form_element.id + '_edit'"><?php esc_html_e( 'Is this field required?', 'invoicing' ); ?></label>
38
+    <label class='form-check-label' :for="active_form_element.id + '_edit'"><?php esc_html_e('Is this field required?', 'invoicing'); ?></label>
39 39
 </div>
40 40
 
41 41
 <hr class='featurette-divider mt-4'>
42 42
 
43 43
 <div class='form-group'>
44 44
     <label class="d-block">
45
-        <span><?php esc_html_e( 'Email Merge Tag', 'invoicing' ); ?></span>
45
+        <span><?php esc_html_e('Email Merge Tag', 'invoicing'); ?></span>
46 46
         <input :value='active_form_element.label | formatMergeTag' class='form-control bg-white' type="text" readonly onclick="this.select()" />
47
-        <span class="form-text text-muted"><?php esc_html_e( 'You can use this merge tag in notification emails', 'invoicing' ); ?></span>
47
+        <span class="form-text text-muted"><?php esc_html_e('You can use this merge tag in notification emails', 'invoicing'); ?></span>
48 48
     </label>
49 49
 </div>
50 50
 
Please login to merge, or discard this patch.
templates/payment-forms-admin/edit/website.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,44 +7,44 @@
 block discarded – undo
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 14
 <div class='form-group'>
15 15
     <label class="d-block">
16
-        <span><?php esc_html_e( 'Field Label', 'invoicing' ); ?></span>
16
+        <span><?php esc_html_e('Field Label', 'invoicing'); ?></span>
17 17
         <input v-model='active_form_element.label' class='form-control' type="text"/>
18 18
     </label>
19 19
 </div>
20 20
 
21 21
 <div class='form-group'>
22 22
     <label class="d-block">
23
-        <span><?php esc_html_e( 'Placeholder text', 'invoicing' ); ?></span>
23
+        <span><?php esc_html_e('Placeholder text', 'invoicing'); ?></span>
24 24
         <input v-model='active_form_element.placeholder' class='form-control' type="text"/>
25 25
     </label>
26 26
 </div>
27 27
 
28 28
 <div class='form-group'>
29 29
     <label class="d-block">
30
-        <span><?php esc_html_e( 'Help Text', 'invoicing' ); ?></span>
31
-        <textarea placeholder='<?php esc_attr_e( 'Add some help text for this field', 'invoicing' ); ?>' v-model='active_form_element.description' class='form-control' rows='3'></textarea>
32
-        <small class="form-text text-muted"><?php _e( 'HTML is allowed', 'invoicing' ); ?></small>
30
+        <span><?php esc_html_e('Help Text', 'invoicing'); ?></span>
31
+        <textarea placeholder='<?php esc_attr_e('Add some help text for this field', 'invoicing'); ?>' v-model='active_form_element.description' class='form-control' rows='3'></textarea>
32
+        <small class="form-text text-muted"><?php _e('HTML is allowed', 'invoicing'); ?></small>
33 33
     </label>
34 34
 </div>
35 35
 
36 36
 <div class='form-group form-check'>
37 37
     <input :id="active_form_element.id + '_edit'" v-model='active_form_element.required' type='checkbox' class='form-check-input' />
38
-    <label class='form-check-label' :for="active_form_element.id + '_edit'"><?php esc_html_e( 'Is this field required?', 'invoicing' ); ?></label>
38
+    <label class='form-check-label' :for="active_form_element.id + '_edit'"><?php esc_html_e('Is this field required?', 'invoicing'); ?></label>
39 39
 </div>
40 40
 
41 41
 <hr class='featurette-divider mt-4'>
42 42
 
43 43
 <div class='form-group'>
44 44
     <label class="d-block">
45
-        <span><?php esc_html_e( 'Email Merge Tag', 'invoicing' ); ?></span>
45
+        <span><?php esc_html_e('Email Merge Tag', 'invoicing'); ?></span>
46 46
         <input :value='active_form_element.label | formatMergeTag' class='form-control bg-white' type="text" readonly onclick="this.select()" />
47
-        <span class="form-text text-muted"><?php esc_html_e( 'You can use this merge tag in notification emails', 'invoicing' ); ?></span>
47
+        <span class="form-text text-muted"><?php esc_html_e('You can use this merge tag in notification emails', 'invoicing'); ?></span>
48 48
     </label>
49 49
 </div>
50 50
 
Please login to merge, or discard this patch.
includes/data/admin-settings.php 1 patch
Spacing   +168 added lines, -168 removed lines patch added patch discarded remove patch
@@ -8,211 +8,211 @@  discard block
 block discarded – undo
8 8
  * @version 1.0.19
9 9
  */
10 10
 
11
-defined( 'ABSPATH' ) || exit;
11
+defined('ABSPATH') || exit;
12 12
 
13 13
 $getpaid_pages = GetPaid_Installer::get_pages();
14
-$pages         = wpinv_get_pages( true );
14
+$pages         = wpinv_get_pages(true);
15 15
     
16 16
 $currencies = wpinv_get_currencies();
17 17
     
18 18
 $currency_code_options = array();
19
-foreach ( $currencies as $code => $name ) {
20
-    $currency_code_options[ $code ] = $code . ' - ' . $name . ' (' . wpinv_currency_symbol( $code ) . ')';
19
+foreach ($currencies as $code => $name) {
20
+    $currency_code_options[$code] = $code . ' - ' . $name . ' (' . wpinv_currency_symbol($code) . ')';
21 21
 }
22 22
 
23 23
 $invoice_number_padd_options = array();
24
-for ( $i = 0; $i <= 20; $i++ ) {
24
+for ($i = 0; $i <= 20; $i++) {
25 25
     $invoice_number_padd_options[$i] = $i;
26 26
 }
27 27
     
28 28
 $currency_symbol = wpinv_currency_symbol();
29 29
     
30 30
 $last_number = $reset_number = '';
31
-if ( $last_invoice_number = get_option( 'wpinv_last_invoice_number' ) ) {
32
-    $last_invoice_number = preg_replace( '/[^0-9]/', '', $last_invoice_number );
31
+if ($last_invoice_number = get_option('wpinv_last_invoice_number')) {
32
+    $last_invoice_number = preg_replace('/[^0-9]/', '', $last_invoice_number);
33 33
 
34
-    if ( !empty( $last_invoice_number ) ) {
35
-        $last_number = ' ' . wp_sprintf( __( "( Last Invoice's sequential number: <b>%s</b> )", 'invoicing' ), $last_invoice_number );
34
+    if (!empty($last_invoice_number)) {
35
+        $last_number = ' ' . wp_sprintf(__("( Last Invoice's sequential number: <b>%s</b> )", 'invoicing'), $last_invoice_number);
36 36
     }
37 37
 
38 38
     $nonce = wp_create_nonce('reset_invoice_count');
39
-    $reset_number = '<a href="'.add_query_arg(array('reset_invoice_count' => 1, '_nonce' => $nonce)).'" class="btn button">'.__('Force Reset Sequence', 'invoicing' ). '</a>';
39
+    $reset_number = '<a href="' . add_query_arg(array('reset_invoice_count' => 1, '_nonce' => $nonce)) . '" class="btn button">' . __('Force Reset Sequence', 'invoicing') . '</a>';
40 40
 }
41 41
     
42 42
 $alert_wrapper_start = '<p style="color: #F00">';
43 43
 $alert_wrapper_close = '</p>';
44 44
 
45 45
 return array(
46
-    'general' => apply_filters( 'wpinv_settings_general',
46
+    'general' => apply_filters('wpinv_settings_general',
47 47
         array(
48 48
             'main' => array(
49 49
                 'location_settings' => array(
50 50
                     'id'   => 'location_settings',
51
-                    'name' => '<h3>' . __( 'Default Location', 'invoicing' ) . '</h3>',
51
+                    'name' => '<h3>' . __('Default Location', 'invoicing') . '</h3>',
52 52
                     'desc' => '',
53 53
                     'type' => 'header',
54 54
                 ),
55 55
                 'default_country' => array(
56 56
                     'id'      => 'default_country',
57
-                    'name'    => __( 'Default Country', 'invoicing' ),
58
-                    'desc'    => __( 'Where does your store operate from?', 'invoicing' ),
57
+                    'name'    => __('Default Country', 'invoicing'),
58
+                    'desc'    => __('Where does your store operate from?', 'invoicing'),
59 59
                     'type'    => 'select',
60 60
                     'options' => wpinv_get_country_list(),
61 61
                     'std'     => 'GB',
62 62
                     'class'   => 'wpi_select2',
63
-                    'placeholder' => __( 'Select a country', 'invoicing' ),
63
+                    'placeholder' => __('Select a country', 'invoicing'),
64 64
                 ),
65 65
                 'default_state' => array(
66 66
                     'id'      => 'default_state',
67
-                    'name'    => __( 'Default State / Province', 'invoicing' ),
68
-                    'desc'    => __( 'What state / province does your store operate from?', 'invoicing' ),
67
+                    'name'    => __('Default State / Province', 'invoicing'),
68
+                    'desc'    => __('What state / province does your store operate from?', 'invoicing'),
69 69
                     'type'    => 'country_states',
70 70
                     'class'   => 'wpi_select2',
71
-                    'placeholder' => __( 'Select a state', 'invoicing' ),
71
+                    'placeholder' => __('Select a state', 'invoicing'),
72 72
                 ),
73 73
                 'store_name' => array(
74 74
                     'id'   => 'store_name',
75
-                    'name' => __( 'Store Name', 'invoicing' ),
76
-                    'desc' => __( 'Store name to print on invoices.', 'invoicing' ),
75
+                    'name' => __('Store Name', 'invoicing'),
76
+                    'desc' => __('Store name to print on invoices.', 'invoicing'),
77 77
                     'std'     => get_option('blogname'),
78 78
                     'type' => 'text',
79 79
                 ),
80 80
                 'logo' => array(
81 81
                     'id'   => 'logo',
82
-                    'name' => __( 'Logo URL', 'invoicing' ),
83
-                    'desc' => __( 'Store logo to print on invoices.', 'invoicing' ),
82
+                    'name' => __('Logo URL', 'invoicing'),
83
+                    'desc' => __('Store logo to print on invoices.', 'invoicing'),
84 84
                     'type' => 'text',
85 85
                 ),
86 86
                 'logo_width'      => array(
87 87
                     'id'          => 'logo_width',
88
-                    'name'        => __( 'Logo width', 'invoicing' ),
89
-                    'desc'        => __( 'Logo width to use in invoice image.', 'invoicing' ),
88
+                    'name'        => __('Logo width', 'invoicing'),
89
+                    'desc'        => __('Logo width to use in invoice image.', 'invoicing'),
90 90
                     'type'        => 'number',
91
-                    'placeholder' => __( 'Auto', 'invoicing' ),
91
+                    'placeholder' => __('Auto', 'invoicing'),
92 92
                 ),
93 93
                 'logo_height'     => array(
94 94
                     'id'          => 'logo_height',
95
-                    'name'        => __( 'Logo height', 'invoicing' ),
96
-                    'desc'        => __( 'Logo height to use in invoice image.', 'invoicing' ),
95
+                    'name'        => __('Logo height', 'invoicing'),
96
+                    'desc'        => __('Logo height to use in invoice image.', 'invoicing'),
97 97
                     'type'        => 'number',
98
-                    'placeholder' => __( 'Auto', 'invoicing' ),
98
+                    'placeholder' => __('Auto', 'invoicing'),
99 99
                 ),
100 100
                 'store_address' => array(
101 101
                     'id'   => 'store_address',
102
-                    'name' => __( 'Store Address', 'invoicing' ),
103
-                    'desc' => __( 'Enter the store address to display on invoice', 'invoicing' ),
102
+                    'name' => __('Store Address', 'invoicing'),
103
+                    'desc' => __('Enter the store address to display on invoice', 'invoicing'),
104 104
                     'type' => 'textarea',
105 105
                 ),
106 106
                 'page_settings' => array(
107 107
                     'id'   => 'page_settings',
108
-                    'name' => '<h3>' . __( 'Page Settings', 'invoicing' ) . '</h3>',
108
+                    'name' => '<h3>' . __('Page Settings', 'invoicing') . '</h3>',
109 109
                     'desc' => '',
110 110
                     'type' => 'header',
111 111
                 ),
112 112
                 'checkout_page' => array(
113 113
                     'id'          => 'checkout_page',
114
-                    'name'        => __( 'Checkout Page', 'invoicing' ),
115
-                    'desc'        => __( 'This is the checkout page where buyers will complete their payments. The <b>[wpinv_checkout]</b> short code must be on this page.', 'invoicing' ),
114
+                    'name'        => __('Checkout Page', 'invoicing'),
115
+                    'desc'        => __('This is the checkout page where buyers will complete their payments. The <b>[wpinv_checkout]</b> short code must be on this page.', 'invoicing'),
116 116
                     'type'        => 'select',
117 117
                     'options'     => $pages,
118 118
                     'class'       => 'wpi_select2',
119
-                    'placeholder' => __( 'Select a page', 'invoicing' ),
120
-                    'default_content' => empty( $getpaid_pages['checkout_page'] ) ? '' : $getpaid_pages['checkout_page']['content'],
119
+                    'placeholder' => __('Select a page', 'invoicing'),
120
+                    'default_content' => empty($getpaid_pages['checkout_page']) ? '' : $getpaid_pages['checkout_page']['content'],
121 121
                     'help-tip'    => true,
122 122
                 ),
123 123
                 'success_page' => array(
124 124
                     'id'          => 'success_page',
125
-                    'name'        => __( 'Success Page', 'invoicing' ),
126
-                    'desc'        => __( 'This is the page buyers are sent to after completing their payments. The <b>[wpinv_receipt]</b> short code should be on this page.', 'invoicing' ),
125
+                    'name'        => __('Success Page', 'invoicing'),
126
+                    'desc'        => __('This is the page buyers are sent to after completing their payments. The <b>[wpinv_receipt]</b> short code should be on this page.', 'invoicing'),
127 127
                     'type'        => 'select',
128 128
                     'options'     => $pages,
129 129
                     'class'       => 'wpi_select2',
130
-                    'placeholder' => __( 'Select a page', 'invoicing' ),
131
-                    'default_content' => empty( $getpaid_pages['success_page'] ) ? '' : $getpaid_pages['success_page']['content'],
130
+                    'placeholder' => __('Select a page', 'invoicing'),
131
+                    'default_content' => empty($getpaid_pages['success_page']) ? '' : $getpaid_pages['success_page']['content'],
132 132
                     'help-tip'    => true,
133 133
                 ),
134 134
                 'failure_page' => array(
135 135
                     'id'          => 'failure_page',
136
-                    'name'        => __( 'Failed Transaction Page', 'invoicing' ),
137
-                    'desc'        => __( 'This is the page buyers are sent to if their transaction is cancelled or fails.', 'invoicing' ),
136
+                    'name'        => __('Failed Transaction Page', 'invoicing'),
137
+                    'desc'        => __('This is the page buyers are sent to if their transaction is cancelled or fails.', 'invoicing'),
138 138
                     'type'        => 'select',
139 139
                     'options'     => $pages,
140 140
                     'class'       => 'wpi_select2',
141
-                    'placeholder' => __( 'Select a page', 'invoicing' ),
142
-                    'default_content' => empty( $getpaid_pages['failure_page'] ) ? '' : $getpaid_pages['failure_page']['content'],
141
+                    'placeholder' => __('Select a page', 'invoicing'),
142
+                    'default_content' => empty($getpaid_pages['failure_page']) ? '' : $getpaid_pages['failure_page']['content'],
143 143
                     'help-tip'    => true,
144 144
                 ),
145 145
                 'invoice_history_page' => array(
146 146
                     'id'          => 'invoice_history_page',
147
-                    'name'        => __( 'Invoice History Page', 'invoicing' ),
148
-                    'desc'        => __( 'This page shows an invoice history for the current user. The <b>[wpinv_history]</b> short code should be on this page.', 'invoicing' ),
147
+                    'name'        => __('Invoice History Page', 'invoicing'),
148
+                    'desc'        => __('This page shows an invoice history for the current user. The <b>[wpinv_history]</b> short code should be on this page.', 'invoicing'),
149 149
                     'type'        => 'select',
150 150
                     'options'     => $pages,
151 151
                     'class'       => 'wpi_select2',
152
-                    'placeholder' => __( 'Select a page', 'invoicing' ),
153
-                    'default_content' => empty( $getpaid_pages['invoice_history_page'] ) ? '' : $getpaid_pages['invoice_history_page']['content'],
152
+                    'placeholder' => __('Select a page', 'invoicing'),
153
+                    'default_content' => empty($getpaid_pages['invoice_history_page']) ? '' : $getpaid_pages['invoice_history_page']['content'],
154 154
                     'help-tip'    => true,
155 155
                 ),
156 156
                 'invoice_subscription_page' => array(
157 157
                     'id'          => 'invoice_subscription_page',
158
-                    'name'        => __( 'Invoice Subscriptions Page', 'invoicing' ),
159
-                    'desc'        => __( 'This page shows subscriptions history for the current user. The <b>[wpinv_subscriptions]</b> short code should be on this page.', 'invoicing' ),
158
+                    'name'        => __('Invoice Subscriptions Page', 'invoicing'),
159
+                    'desc'        => __('This page shows subscriptions history for the current user. The <b>[wpinv_subscriptions]</b> short code should be on this page.', 'invoicing'),
160 160
                     'type'        => 'select',
161 161
                     'options'     => $pages,
162 162
                     'class'       => 'wpi_select2',
163
-                    'placeholder' => __( 'Select a page', 'invoicing' ),
164
-                    'default_content' => empty( $getpaid_pages['invoice_subscription_page'] ) ? '' : $getpaid_pages['invoice_subscription_page']['content'],
163
+                    'placeholder' => __('Select a page', 'invoicing'),
164
+                    'default_content' => empty($getpaid_pages['invoice_subscription_page']) ? '' : $getpaid_pages['invoice_subscription_page']['content'],
165 165
                     'help-tip'    => true,
166 166
                 ),
167 167
             ),
168 168
             'currency_section' => array(
169 169
                 'currency_settings' => array(
170 170
                     'id'   => 'currency_settings',
171
-                    'name' => '<h3>' . __( 'Currency Settings', 'invoicing' ) . '</h3>',
171
+                    'name' => '<h3>' . __('Currency Settings', 'invoicing') . '</h3>',
172 172
                     'desc' => '',
173 173
                     'type' => 'header',
174 174
                 ),
175 175
                 'currency' => array(
176 176
                     'id'      => 'currency',
177
-                    'name'    => __( 'Currency', 'invoicing' ),
178
-                    'desc'    => __( 'Choose your currency. Note that some payment gateways have currency restrictions.', 'invoicing' ),
177
+                    'name'    => __('Currency', 'invoicing'),
178
+                    'desc'    => __('Choose your currency. Note that some payment gateways have currency restrictions.', 'invoicing'),
179 179
                     'type'    => 'select',
180 180
                     'class'       => 'wpi_select2',
181 181
                     'options' => $currency_code_options,
182 182
                 ),
183 183
                 'currency_position' => array(
184 184
                     'id'      => 'currency_position',
185
-                    'name'    => __( 'Currency Position', 'invoicing' ),
186
-                    'desc'    => __( 'Choose the location of the currency sign.', 'invoicing' ),
185
+                    'name'    => __('Currency Position', 'invoicing'),
186
+                    'desc'    => __('Choose the location of the currency sign.', 'invoicing'),
187 187
                     'type'    => 'select',
188 188
                     'class'   => 'wpi_select2',
189 189
                     'options'  => array(
190
-                        'left'        => __( 'Left', 'invoicing' ) . ' (' . $currency_symbol . wpinv_format_amount( '99.99' ) . ')',
191
-                        'right'       => __( 'Right', 'invoicing' ) . ' ('. wpinv_format_amount( '99.99' ) . $currency_symbol . ')',
192
-                        'left_space'  => __( 'Left with space', 'invoicing' ) . ' (' . $currency_symbol . ' ' . wpinv_format_amount( '99.99' ) . ')',
193
-                        'right_space' => __( 'Right with space', 'invoicing' ) . ' (' . wpinv_format_amount( '99.99' ) . ' ' . $currency_symbol . ')'
190
+                        'left'        => __('Left', 'invoicing') . ' (' . $currency_symbol . wpinv_format_amount('99.99') . ')',
191
+                        'right'       => __('Right', 'invoicing') . ' (' . wpinv_format_amount('99.99') . $currency_symbol . ')',
192
+                        'left_space'  => __('Left with space', 'invoicing') . ' (' . $currency_symbol . ' ' . wpinv_format_amount('99.99') . ')',
193
+                        'right_space' => __('Right with space', 'invoicing') . ' (' . wpinv_format_amount('99.99') . ' ' . $currency_symbol . ')'
194 194
                     )
195 195
                 ),
196 196
                 'thousands_separator' => array(
197 197
                     'id'   => 'thousands_separator',
198
-                    'name' => __( 'Thousands Separator', 'invoicing' ),
199
-                    'desc' => __( 'The symbol (usually , or .) to separate thousands', 'invoicing' ),
198
+                    'name' => __('Thousands Separator', 'invoicing'),
199
+                    'desc' => __('The symbol (usually , or .) to separate thousands', 'invoicing'),
200 200
                     'type' => 'text',
201 201
                     'size' => 'small',
202 202
                     'std'  => ',',
203 203
                 ),
204 204
                 'decimal_separator' => array(
205 205
                     'id'   => 'decimal_separator',
206
-                    'name' => __( 'Decimal Separator', 'invoicing' ),
207
-                    'desc' => __( 'The symbol (usually , or .) to separate decimal points', 'invoicing' ),
206
+                    'name' => __('Decimal Separator', 'invoicing'),
207
+                    'desc' => __('The symbol (usually , or .) to separate decimal points', 'invoicing'),
208 208
                     'type' => 'text',
209 209
                     'size' => 'small',
210 210
                     'std'  => '.',
211 211
                 ),
212 212
                 'decimals' => array(
213 213
                     'id'   => 'decimals',
214
-                    'name' => __( 'Number of Decimals', 'invoicing' ),
215
-                    'desc' => __( 'This sets the number of decimal points shown in displayed prices.', 'invoicing' ),
214
+                    'name' => __('Number of Decimals', 'invoicing'),
215
+                    'desc' => __('This sets the number of decimal points shown in displayed prices.', 'invoicing'),
216 216
                     'type' => 'number',
217 217
                     'size' => 'small',
218 218
                     'std'  => '2',
@@ -224,21 +224,21 @@  discard block
 block discarded – undo
224 224
             'labels' => array(
225 225
                 'labels' => array(
226 226
                     'id'   => 'labels_settings',
227
-                    'name' => '<h3>' . __( 'Invoice Labels', 'invoicing' ) . '</h3>',
227
+                    'name' => '<h3>' . __('Invoice Labels', 'invoicing') . '</h3>',
228 228
                     'desc' => '',
229 229
                     'type' => 'header',
230 230
                 ),
231 231
                 'vat_invoice_notice_label' => array(
232 232
                     'id' => 'vat_invoice_notice_label',
233
-                    'name' => __( 'Invoice Notice Label', 'invoicing' ),
234
-                    'desc' => __( 'Use this to add an invoice notice section (label) to your invoices', 'invoicing' ),
233
+                    'name' => __('Invoice Notice Label', 'invoicing'),
234
+                    'desc' => __('Use this to add an invoice notice section (label) to your invoices', 'invoicing'),
235 235
                     'type' => 'text',
236 236
                     'size' => 'regular',
237 237
                 ),
238 238
                 'vat_invoice_notice' => array(
239 239
                     'id' => 'vat_invoice_notice',
240
-                    'name' => __( 'Invoice notice', 'invoicing' ),
241
-                    'desc' =>   __( 'Use this to add an invoice notice section (description) to your invoices', 'invoicing' ),
240
+                    'name' => __('Invoice notice', 'invoicing'),
241
+                    'desc' =>   __('Use this to add an invoice notice section (description) to your invoices', 'invoicing'),
242 242
                     'type' => 'text',
243 243
                     'size' => 'regular',
244 244
                 ),
@@ -250,22 +250,22 @@  discard block
 block discarded – undo
250 250
             'main' => array(
251 251
                 'gateway_settings' => array(
252 252
                     'id'   => 'api_header',
253
-                    'name' => '<h3>' . __( 'Gateway Settings', 'invoicing' ) . '</h3>',
253
+                    'name' => '<h3>' . __('Gateway Settings', 'invoicing') . '</h3>',
254 254
                     'desc' => '',
255 255
                     'type' => 'header',
256 256
                 ),
257 257
                 'gateways' => array(
258 258
                     'id'      => 'gateways',
259
-                    'name'    => __( 'Payment Gateways', 'invoicing' ),
260
-                    'desc'    => __( 'Choose the payment gateways you want to enable.', 'invoicing' ),
259
+                    'name'    => __('Payment Gateways', 'invoicing'),
260
+                    'desc'    => __('Choose the payment gateways you want to enable.', 'invoicing'),
261 261
                     'type'    => 'gateways',
262
-                    'std'     => array( 'manual'=>1 ),
262
+                    'std'     => array('manual'=>1),
263 263
                     'options' => wpinv_get_payment_gateways(),
264 264
                 ),
265 265
                 'default_gateway' => array(
266 266
                     'id'      => 'default_gateway',
267
-                    'name'    => __( 'Default Gateway', 'invoicing' ),
268
-                    'desc'    => __( 'This gateway will be loaded automatically with the checkout page.', 'invoicing' ),
267
+                    'name'    => __('Default Gateway', 'invoicing'),
268
+                    'desc'    => __('This gateway will be loaded automatically with the checkout page.', 'invoicing'),
269 269
                     'type'    => 'gateway_select',
270 270
                     'std'     => 'manual',
271 271
                     'class'   => 'wpi_select2',
@@ -280,32 +280,32 @@  discard block
 block discarded – undo
280 280
             'main' => array(
281 281
                 'tax_settings' => array(
282 282
                     'id'   => 'tax_settings',
283
-                    'name' => '<h3>' . __( 'Tax Settings', 'invoicing' ) . '</h3>',
283
+                    'name' => '<h3>' . __('Tax Settings', 'invoicing') . '</h3>',
284 284
                     'type' => 'header',
285 285
                 ),
286 286
 
287 287
                 'enable_taxes' => array(
288 288
                     'id'       => 'enable_taxes',
289
-                    'name'     => __( 'Enable Taxes', 'invoicing' ),
290
-                    'desc'     => __( 'Enable tax rates and calculations.', 'invoicing' ),
289
+                    'name'     => __('Enable Taxes', 'invoicing'),
290
+                    'desc'     => __('Enable tax rates and calculations.', 'invoicing'),
291 291
                     'type'     => 'checkbox',
292 292
                     'std'      => 0,
293 293
                 ),
294 294
 
295 295
                 'tax_subtotal_rounding' => array(
296 296
                     'id'                => 'tax_subtotal_rounding',
297
-                    'name'              => __( 'Rounding', 'invoicing' ),
298
-                    'desc'              => __( 'Round tax at subtotal level, instead of rounding per tax rate', 'invoicing' ),
297
+                    'name'              => __('Rounding', 'invoicing'),
298
+                    'desc'              => __('Round tax at subtotal level, instead of rounding per tax rate', 'invoicing'),
299 299
                     'type'              => 'checkbox',
300 300
                     'std'               => 1,
301 301
                 ),
302 302
 
303 303
                 'prices_include_tax' => array(
304 304
                     'id'      => 'prices_include_tax',
305
-                    'name'    => __( 'Prices entered with tax', 'invoicing' ),
305
+                    'name'    => __('Prices entered with tax', 'invoicing'),
306 306
                     'options' => array(
307
-                        'yes' => __( 'Yes, I will enter prices inclusive of tax', 'invoicing' ),
308
-                        'no'  => __( 'No, I will enter prices exclusive of tax', 'invoicing' ),
307
+                        'yes' => __('Yes, I will enter prices inclusive of tax', 'invoicing'),
308
+                        'no'  => __('No, I will enter prices exclusive of tax', 'invoicing'),
309 309
                     ),
310 310
                     'type'    => 'select',
311 311
                     'std'     => 'no',
@@ -313,10 +313,10 @@  discard block
 block discarded – undo
313 313
 
314 314
                 'tax_base'              => array(
315 315
                     'id'                => 'tax_base',
316
-                    'name'              => __( 'Calculate tax based on', 'invoicing' ),
316
+                    'name'              => __('Calculate tax based on', 'invoicing'),
317 317
                     'options'           => array(
318
-                        'billing'       => __( 'Customer billing address', 'invoicing' ),
319
-                        'base'          => __( 'Shop base address', 'invoicing' ),
318
+                        'billing'       => __('Customer billing address', 'invoicing'),
319
+                        'base'          => __('Shop base address', 'invoicing'),
320 320
                     ),
321 321
                     'type'              => 'select',
322 322
                     'std'               => 'billing',
@@ -324,10 +324,10 @@  discard block
 block discarded – undo
324 324
 
325 325
                 'tax_display_totals'    => array(
326 326
                     'id'                => 'tax_display_totals',
327
-                    'name'              => __( 'Display tax totals', 'invoicing' ),
327
+                    'name'              => __('Display tax totals', 'invoicing'),
328 328
                     'options'           => array(
329
-                        'single'        => __( 'As a single total', 'invoicing' ),
330
-                        'individual'    => __( 'As individual tax rates', 'invoicing' ),
329
+                        'single'        => __('As a single total', 'invoicing'),
330
+                        'individual'    => __('As individual tax rates', 'invoicing'),
331 331
                     ),
332 332
                     'type'              => 'select',
333 333
                     'std'               => 'individual',
@@ -335,8 +335,8 @@  discard block
 block discarded – undo
335 335
 
336 336
                 'tax_rate' => array(
337 337
                     'id'   => 'tax_rate',
338
-                    'name' => __( 'Fallback Tax Rate', 'invoicing' ),
339
-                    'desc' => __( 'Enter a percentage, such as 6.5. Customers not in a specific rate will be charged this rate.', 'invoicing' ),
338
+                    'name' => __('Fallback Tax Rate', 'invoicing'),
339
+                    'desc' => __('Enter a percentage, such as 6.5. Customers not in a specific rate will be charged this rate.', 'invoicing'),
340 340
                     'type' => 'number',
341 341
                     'size' => 'small',
342 342
                     'min'  => '0',
@@ -348,8 +348,8 @@  discard block
 block discarded – undo
348 348
             'rates' => array(
349 349
                 'tax_rates' => array(
350 350
                     'id'   => 'tax_rates',
351
-                    'name' => '<h3>' . __( 'Tax Rates', 'invoicing' ) . '</h3>',
352
-                    'desc' => __( 'Enter tax rates for specific regions.', 'invoicing' ),
351
+                    'name' => '<h3>' . __('Tax Rates', 'invoicing') . '</h3>',
352
+                    'desc' => __('Enter tax rates for specific regions.', 'invoicing'),
353 353
                     'type' => 'tax_rates',
354 354
                 ),
355 355
             ),
@@ -358,45 +358,45 @@  discard block
 block discarded – undo
358 358
 
359 359
                 'vat_company_name' => array(
360 360
                     'id' => 'vat_company_name',
361
-                    'name' => __( 'Company Name', 'invoicing' ),
362
-                    'desc' => wp_sprintf(__( 'Verify your company name and  VAT number on the %sEU VIES System.%s', 'invoicing' ), '<a href="http://ec.europa.eu/taxation_customs/vies/" target="_blank">', '</a>' ),
361
+                    'name' => __('Company Name', 'invoicing'),
362
+                    'desc' => wp_sprintf(__('Verify your company name and  VAT number on the %sEU VIES System.%s', 'invoicing'), '<a href="http://ec.europa.eu/taxation_customs/vies/" target="_blank">', '</a>'),
363 363
                     'type' => 'text',
364 364
                     'size' => 'regular',
365 365
                 ),
366 366
 
367 367
                 'vat_number' => array(
368 368
                     'id'   => 'vat_number',
369
-                    'name' => __( 'VAT Number', 'invoicing' ),
370
-                    'desc' => __( 'Enter your VAT number including the country identifier, eg: GB123456789', 'invoicing' ),
369
+                    'name' => __('VAT Number', 'invoicing'),
370
+                    'desc' => __('Enter your VAT number including the country identifier, eg: GB123456789', 'invoicing'),
371 371
                     'type' => 'text',
372 372
                     'size' => 'regular',
373 373
                 ),
374 374
 
375 375
                 'vat_prevent_b2c_purchase' => array(
376 376
                     'id' => 'vat_prevent_b2c_purchase',
377
-                    'name' => __( 'Prevent B2C Sales', 'invoicing' ),
378
-                    'desc' => __( 'Require everyone in the EU to provide a VAT number.', 'invoicing' ),
377
+                    'name' => __('Prevent B2C Sales', 'invoicing'),
378
+                    'desc' => __('Require everyone in the EU to provide a VAT number.', 'invoicing'),
379 379
                     'type' => 'checkbox'
380 380
                 ),
381 381
 
382 382
                 'validate_vat_number' => array(
383 383
                     'id'   => 'validate_vat_number',
384
-                    'name' => __( 'Validate VAT Number', 'invoicing' ),
385
-                    'desc' => __( 'Validate VAT numbers with VIES.', 'invoicing' ),
384
+                    'name' => __('Validate VAT Number', 'invoicing'),
385
+                    'desc' => __('Validate VAT numbers with VIES.', 'invoicing'),
386 386
                     'type' => 'checkbox'
387 387
                 ),
388 388
 
389 389
                 'vat_same_country_rule' => array(
390 390
                     'id'          => 'vat_same_country_rule',
391
-                    'name'        => __( 'Same Country Rule', 'invoicing' ),
392
-                    'desc'        => __( 'What should happen if a customer is from the same country as your business?', 'invoicing' ),
391
+                    'name'        => __('Same Country Rule', 'invoicing'),
392
+                    'desc'        => __('What should happen if a customer is from the same country as your business?', 'invoicing'),
393 393
                     'type'        => 'select',
394 394
                     'options'     => array(
395
-                        'no'        => __( 'Do not charge tax', 'invoicing' ),
396
-                        'always'    => __( 'Charge tax unless vat number is validated', 'invoicing' ),
397
-                        'vat_too'   => __( 'Charge tax even if vat number is validated', 'invoicing' )
395
+                        'no'        => __('Do not charge tax', 'invoicing'),
396
+                        'always'    => __('Charge tax unless vat number is validated', 'invoicing'),
397
+                        'vat_too'   => __('Charge tax even if vat number is validated', 'invoicing')
398 398
                     ),
399
-                    'placeholder' => __( 'Select an option', 'invoicing' ),
399
+                    'placeholder' => __('Select an option', 'invoicing'),
400 400
                     'std'         => 'vat_too',
401 401
                 ),
402 402
 
@@ -410,59 +410,59 @@  discard block
 block discarded – undo
410 410
             'main' => array(
411 411
                 'email_settings_header' => array(
412 412
                     'id'   => 'email_settings_header',
413
-                    'name' => '<h3>' . __( 'Email Sender Options', 'invoicing' ) . '</h3>',
413
+                    'name' => '<h3>' . __('Email Sender Options', 'invoicing') . '</h3>',
414 414
                     'type' => 'header',
415 415
                 ),
416 416
                 'email_from_name' => array(
417 417
                     'id'   => 'email_from_name',
418
-                    'name' => __( 'From Name', 'invoicing' ),
419
-                    'desc' => __( 'Enter the sender\'s name appears in outgoing invoice emails. This should be your site name.', 'invoicing' ),
420
-                    'std' => esc_attr( get_bloginfo( 'name', 'display' ) ),
418
+                    'name' => __('From Name', 'invoicing'),
419
+                    'desc' => __('Enter the sender\'s name appears in outgoing invoice emails. This should be your site name.', 'invoicing'),
420
+                    'std' => esc_attr(get_bloginfo('name', 'display')),
421 421
                     'type' => 'text',
422 422
                 ),
423 423
                 'email_from' => array(
424 424
                     'id'   => 'email_from',
425
-                    'name' => __( 'From Email', 'invoicing' ),
426
-                    'desc' => sprintf (__( 'Email address to send invoice emails from. This will act as the "from" address. %s If emails are not being sent it may be that your hosting prevents emails being sent if the email domains do not match.%s', 'invoicing' ), $alert_wrapper_start, $alert_wrapper_close),
427
-                    'std' => get_option( 'admin_email' ),
425
+                    'name' => __('From Email', 'invoicing'),
426
+                    'desc' => sprintf(__('Email address to send invoice emails from. This will act as the "from" address. %s If emails are not being sent it may be that your hosting prevents emails being sent if the email domains do not match.%s', 'invoicing'), $alert_wrapper_start, $alert_wrapper_close),
427
+                    'std' => get_option('admin_email'),
428 428
                     'type' => 'text',
429 429
                 ),
430 430
                 'admin_email' => array(
431 431
                     'id'   => 'admin_email',
432
-                    'name' => __( 'Admin Email', 'invoicing' ),
433
-                    'desc' => __( 'Where should we send admin notifications? This will is also act as the "reply-to" address for invoice emails', 'invoicing' ),
434
-                    'std' => get_option( 'admin_email' ),
432
+                    'name' => __('Admin Email', 'invoicing'),
433
+                    'desc' => __('Where should we send admin notifications? This will is also act as the "reply-to" address for invoice emails', 'invoicing'),
434
+                    'std' => get_option('admin_email'),
435 435
                     'type' => 'text',
436 436
                 ),
437 437
                 'overdue_settings_header' => array(
438 438
                     'id'   => 'overdue_settings_header',
439
-                    'name' => '<h3>' . __( 'Due Date Settings', 'invoicing' ) . '</h3>',
439
+                    'name' => '<h3>' . __('Due Date Settings', 'invoicing') . '</h3>',
440 440
                     'type' => 'header',
441 441
                 ),
442 442
                 'overdue_active' => array(
443 443
                     'id'   => 'overdue_active',
444
-                    'name' => __( 'Enable Due Date', 'invoicing' ),
445
-                    'desc' => __( 'Check this to enable due date option for invoices.', 'invoicing' ),
444
+                    'name' => __('Enable Due Date', 'invoicing'),
445
+                    'desc' => __('Check this to enable due date option for invoices.', 'invoicing'),
446 446
                     'type' => 'checkbox',
447 447
                     'std'  => false,
448 448
                 ),
449 449
                 'email_template_header' => array(
450 450
                     'id'   => 'email_template_header',
451
-                    'name' => '<h3>' . __( 'Email Template', 'invoicing' ) . '</h3>',
451
+                    'name' => '<h3>' . __('Email Template', 'invoicing') . '</h3>',
452 452
                     'type' => 'header',
453 453
                 ),
454 454
                 'email_header_image' => array(
455 455
                     'id'   => 'email_header_image',
456
-                    'name' => __( 'Header Image', 'invoicing' ),
457
-                    'desc' => __( 'URL to an image you want to show in the email header. Upload images using the media uploader (Admin > Media).', 'invoicing' ),
456
+                    'name' => __('Header Image', 'invoicing'),
457
+                    'desc' => __('URL to an image you want to show in the email header. Upload images using the media uploader (Admin > Media).', 'invoicing'),
458 458
                     'std' => '',
459 459
                     'type' => 'text',
460 460
                 ),
461 461
                 'email_footer_text' => array(
462 462
                     'id'   => 'email_footer_text',
463
-                    'name' => __( 'Footer Text', 'invoicing' ),
464
-                    'desc' => __( 'The text to appear in the footer of all invoice emails.', 'invoicing' ),
465
-                    'std' => get_bloginfo( 'name', 'display' ) . ' - ' . __( 'Powered by GetPaid', 'invoicing' ),
463
+                    'name' => __('Footer Text', 'invoicing'),
464
+                    'desc' => __('The text to appear in the footer of all invoice emails.', 'invoicing'),
465
+                    'std' => get_bloginfo('name', 'display') . ' - ' . __('Powered by GetPaid', 'invoicing'),
466 466
                     'type' => 'textarea',
467 467
                     'class' => 'regular-text',
468 468
                     'rows' => 2,
@@ -470,29 +470,29 @@  discard block
 block discarded – undo
470 470
                 ),
471 471
                 'email_base_color' => array(
472 472
                     'id'   => 'email_base_color',
473
-                    'name' => __( 'Base Color', 'invoicing' ),
474
-                    'desc' => __( 'The base color for invoice email template. Default <code>#557da2</code>.', 'invoicing' ),
473
+                    'name' => __('Base Color', 'invoicing'),
474
+                    'desc' => __('The base color for invoice email template. Default <code>#557da2</code>.', 'invoicing'),
475 475
                     'std' => '#557da2',
476 476
                     'type' => 'color',
477 477
                 ),
478 478
                 'email_background_color' => array(
479 479
                     'id'   => 'email_background_color',
480
-                    'name' => __( 'Background Color', 'invoicing' ),
481
-                    'desc' => __( 'The background color of email template. Default <code>#f5f5f5</code>.', 'invoicing' ),
480
+                    'name' => __('Background Color', 'invoicing'),
481
+                    'desc' => __('The background color of email template. Default <code>#f5f5f5</code>.', 'invoicing'),
482 482
                     'std' => '#f5f5f5',
483 483
                     'type' => 'color',
484 484
                 ),
485 485
                 'email_body_background_color' => array(
486 486
                     'id'   => 'email_body_background_color',
487
-                    'name' => __( 'Body Background Color', 'invoicing' ),
488
-                    'desc' => __( 'The main body background color of email template. Default <code>#fdfdfd</code>.', 'invoicing' ),
487
+                    'name' => __('Body Background Color', 'invoicing'),
488
+                    'desc' => __('The main body background color of email template. Default <code>#fdfdfd</code>.', 'invoicing'),
489 489
                     'std' => '#fdfdfd',
490 490
                     'type' => 'color',
491 491
                 ),
492 492
                 'email_text_color' => array(
493 493
                     'id'   => 'email_text_color',
494
-                    'name' => __( 'Body Text Color', 'invoicing' ),
495
-                    'desc' => __( 'The main body text color. Default <code>#505050</code>.', 'invoicing' ),
494
+                    'name' => __('Body Text Color', 'invoicing'),
495
+                    'desc' => __('The main body text color. Default <code>#505050</code>.', 'invoicing'),
496 496
                     'std' => '#505050',
497 497
                     'type' => 'color',
498 498
                 ),
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
     ),
508 508
 
509 509
     // Integrations.
510
-    'integrations' => wp_list_pluck( getpaid_get_integration_settings(), 'settings', 'id' ),
510
+    'integrations' => wp_list_pluck(getpaid_get_integration_settings(), 'settings', 'id'),
511 511
 
512 512
     /** Privacy Settings */
513 513
     'privacy' => apply_filters('wpinv_settings_privacy',
@@ -515,17 +515,17 @@  discard block
 block discarded – undo
515 515
             'main' => array(
516 516
                 'invoicing_privacy_policy_settings' => array(
517 517
                     'id'   => 'invoicing_privacy_policy_settings',
518
-                    'name' => '<h3>' . __( 'Privacy Policy', 'invoicing' ) . '</h3>',
518
+                    'name' => '<h3>' . __('Privacy Policy', 'invoicing') . '</h3>',
519 519
                     'type' => 'header',
520 520
                 ),
521 521
                 'privacy_page' => array(
522 522
                     'id'          => 'privacy_page',
523
-                    'name'        => __( 'Privacy Page', 'invoicing' ),
524
-                    'desc'        => __( 'If no privacy policy page set in Settings->Privacy default settings, this page will be used on checkout page.', 'invoicing' ),
523
+                    'name'        => __('Privacy Page', 'invoicing'),
524
+                    'desc'        => __('If no privacy policy page set in Settings->Privacy default settings, this page will be used on checkout page.', 'invoicing'),
525 525
                     'type'        => 'select',
526
-                    'options'     => wpinv_get_pages( true,  __( 'Select a page', 'invoicing' )),
526
+                    'options'     => wpinv_get_pages(true, __('Select a page', 'invoicing')),
527 527
                     'class'       => 'wpi_select2',
528
-                    'placeholder' => __( 'Select a page', 'invoicing' ),
528
+                    'placeholder' => __('Select a page', 'invoicing'),
529 529
                 ),
530 530
             ),
531 531
         )
@@ -536,19 +536,19 @@  discard block
 block discarded – undo
536 536
             'main' => array(
537 537
                 'invoice_number_format_settings' => array(
538 538
                     'id'   => 'invoice_number_format_settings',
539
-                    'name' => '<h3>' . __( 'Invoice Number', 'invoicing' ) . '</h3>',
539
+                    'name' => '<h3>' . __('Invoice Number', 'invoicing') . '</h3>',
540 540
                     'type' => 'header',
541 541
                 ),
542 542
                 'sequential_invoice_number' => array(
543 543
                     'id'   => 'sequential_invoice_number',
544
-                    'name' => __( 'Sequential Invoice Numbers', 'invoicing' ),
545
-                    'desc' => __('Check this box to enable sequential invoice numbers.', 'invoicing' ) . $reset_number,
544
+                    'name' => __('Sequential Invoice Numbers', 'invoicing'),
545
+                    'desc' => __('Check this box to enable sequential invoice numbers.', 'invoicing') . $reset_number,
546 546
                     'type' => 'checkbox',
547 547
                 ),
548 548
                 'invoice_sequence_start' => array(
549 549
                     'id'   => 'invoice_sequence_start',
550
-                    'name' => __( 'Sequential Starting Number', 'invoicing' ),
551
-                    'desc' => __( 'The number at which the invoice number sequence should begin.', 'invoicing' ) . $last_number,
550
+                    'name' => __('Sequential Starting Number', 'invoicing'),
551
+                    'desc' => __('The number at which the invoice number sequence should begin.', 'invoicing') . $last_number,
552 552
                     'type' => 'number',
553 553
                     'size' => 'small',
554 554
                     'std'  => '1',
@@ -556,8 +556,8 @@  discard block
 block discarded – undo
556 556
                 ),
557 557
                 'invoice_number_padd' => array(
558 558
                     'id'      => 'invoice_number_padd',
559
-                    'name'    => __( 'Minimum Digits', 'invoicing' ),
560
-                    'desc'    => __( 'If the invoice number has less digits than this number, it is left padded with 0s. Ex: invoice number 108 will padded to 00108 if digits set to 5. The default 0 means no padding.', 'invoicing' ),
559
+                    'name'    => __('Minimum Digits', 'invoicing'),
560
+                    'desc'    => __('If the invoice number has less digits than this number, it is left padded with 0s. Ex: invoice number 108 will padded to 00108 if digits set to 5. The default 0 means no padding.', 'invoicing'),
561 561
                     'type'    => 'select',
562 562
                     'options' => $invoice_number_padd_options,
563 563
                     'std'     => 5,
@@ -565,8 +565,8 @@  discard block
 block discarded – undo
565 565
                 ),
566 566
                 'invoice_number_prefix' => array(
567 567
                     'id' => 'invoice_number_prefix',
568
-                    'name' => __( 'Invoice Number Prefix', 'invoicing' ),
569
-                    'desc' => __( 'Prefix for all invoice numbers. Ex: INV-', 'invoicing' ),
568
+                    'name' => __('Invoice Number Prefix', 'invoicing'),
569
+                    'desc' => __('Prefix for all invoice numbers. Ex: INV-', 'invoicing'),
570 570
                     'type' => 'text',
571 571
                     'size' => 'regular',
572 572
                     'std' => 'INV-',
@@ -574,46 +574,46 @@  discard block
 block discarded – undo
574 574
                 ),
575 575
                 'invoice_number_postfix' => array(
576 576
                     'id' => 'invoice_number_postfix',
577
-                    'name' => __( 'Invoice Number Postfix', 'invoicing' ),
578
-                    'desc' => __( 'Postfix for all invoice numbers.', 'invoicing' ),
577
+                    'name' => __('Invoice Number Postfix', 'invoicing'),
578
+                    'desc' => __('Postfix for all invoice numbers.', 'invoicing'),
579 579
                     'type' => 'text',
580 580
                     'size' => 'regular',
581 581
                     'std' => ''
582 582
                 ),
583 583
                 'checkout_settings' => array(
584 584
                     'id'   => 'checkout_settings',
585
-                    'name' => '<h3>' . __( 'Checkout Settings', 'invoicing' ) . '</h3>',
585
+                    'name' => '<h3>' . __('Checkout Settings', 'invoicing') . '</h3>',
586 586
                     'type' => 'header',
587 587
                 ),
588 588
                 'disable_new_user_emails' => array(
589 589
                     'id'   => 'disable_new_user_emails',
590
-                    'name' => __( 'Disable new user emails', 'invoicing' ),
591
-                    'desc' => __( 'Do not send an email to customers when a new user account is created for them.', 'invoicing' ),
590
+                    'name' => __('Disable new user emails', 'invoicing'),
591
+                    'desc' => __('Do not send an email to customers when a new user account is created for them.', 'invoicing'),
592 592
                     'type' => 'checkbox',
593 593
                 ),
594 594
                 'login_to_checkout' => array(
595 595
                     'id'   => 'login_to_checkout',
596
-                    'name' => __( 'Require Login To Checkout', 'invoicing' ),
597
-                    'desc' => __( 'If ticked then user needs to be logged in to view or pay invoice, can only view or pay their own invoice. If unticked then anyone can view or pay the invoice.', 'invoicing' ),
596
+                    'name' => __('Require Login To Checkout', 'invoicing'),
597
+                    'desc' => __('If ticked then user needs to be logged in to view or pay invoice, can only view or pay their own invoice. If unticked then anyone can view or pay the invoice.', 'invoicing'),
598 598
                     'type' => 'checkbox',
599 599
                 ),
600 600
                 'maxmind_license_key' => array(
601 601
                     'id'   => 'maxmind_license_key',
602
-                    'name' => __( 'MaxMind License Key', 'invoicing' ),
602
+                    'name' => __('MaxMind License Key', 'invoicing'),
603 603
                     'type' => 'text',
604 604
                     'size' => 'regular',
605
-                    'desc' => __( "Enter you license key if you would like to use MaxMind to automatically detect a customer's country.", 'invoicing' ) . ' <a href="https://support.maxmind.com/account-faq/license-keys/how-do-i-generate-a-license-key/">' . __( 'How to generate a free license key.', 'invoicing' ) . '</a>',
605
+                    'desc' => __("Enter you license key if you would like to use MaxMind to automatically detect a customer's country.", 'invoicing') . ' <a href="https://support.maxmind.com/account-faq/license-keys/how-do-i-generate-a-license-key/">' . __('How to generate a free license key.', 'invoicing') . '</a>',
606 606
                 ),
607 607
 
608 608
                 'uninstall_settings' => array(
609 609
                     'id'   => 'uninstall_settings',
610
-                    'name' => '<h3>' . __( 'Uninstall Settings', 'invoicing' ) . '</h3>',
610
+                    'name' => '<h3>' . __('Uninstall Settings', 'invoicing') . '</h3>',
611 611
                     'type' => 'header',
612 612
                 ),
613 613
                 'remove_data_on_unistall' => array(
614 614
                     'id'   => 'remove_data_on_unistall',
615
-                    'name' => __( 'Remove Data on Uninstall?', 'invoicing' ),
616
-                    'desc' => __( 'Check this box if you would like Invoicing plugin to completely remove all of its data when the plugin is deleted/uninstalled.', 'invoicing' ),
615
+                    'name' => __('Remove Data on Uninstall?', 'invoicing'),
616
+                    'desc' => __('Check this box if you would like Invoicing plugin to completely remove all of its data when the plugin is deleted/uninstalled.', 'invoicing'),
617 617
                     'type' => 'checkbox',
618 618
                     'std'  => ''
619 619
                 ),
@@ -622,13 +622,13 @@  discard block
 block discarded – undo
622 622
             'custom-css' => array(
623 623
                 'css_settings' => array(
624 624
                     'id'   => 'css_settings',
625
-                    'name' => '<h3>' . __( 'Custom CSS', 'invoicing' ) . '</h3>',
625
+                    'name' => '<h3>' . __('Custom CSS', 'invoicing') . '</h3>',
626 626
                     'type' => 'header',
627 627
                 ),
628 628
                 'template_custom_css' => array(
629 629
                     'id' => 'template_custom_css',
630
-                    'name' => __( 'Invoice Template CSS', 'invoicing' ),
631
-                    'desc' => __( 'Add CSS to modify appearance of the print invoice page.', 'invoicing' ),
630
+                    'name' => __('Invoice Template CSS', 'invoicing'),
631
+                    'desc' => __('Add CSS to modify appearance of the print invoice page.', 'invoicing'),
632 632
                     'type' => 'textarea',
633 633
                     'class'=> 'regular-text',
634 634
                     'rows' => 10,
@@ -642,8 +642,8 @@  discard block
 block discarded – undo
642 642
             'main' => array(
643 643
                 'tool_settings' => array(
644 644
                     'id'   => 'tool_settings',
645
-                    'name' => '<h3>' . __( 'Diagnostic Tools', 'invoicing' ) . '</h3>',
646
-                    'desc' => __( 'Invoicing diagnostic tools', 'invoicing' ),
645
+                    'name' => '<h3>' . __('Diagnostic Tools', 'invoicing') . '</h3>',
646
+                    'desc' => __('Invoicing diagnostic tools', 'invoicing'),
647 647
                     'type' => 'tools',
648 648
                 ),
649 649
             ),
Please login to merge, or discard this patch.
includes/admin/class-getpaid-installer.php 2 patches
Indentation   +369 added lines, -369 removed lines patch added patch discarded remove patch
@@ -20,222 +20,222 @@  discard block
 block discarded – undo
20 20
  */
21 21
 class GetPaid_Installer {
22 22
 
23
-	/**
24
-	 * Upgrades the install.
25
-	 *
26
-	 * @param string $upgrade_from The current invoicing version.
27
-	 */
28
-	public function upgrade_db( $upgrade_from ) {
29
-
30
-		// Save the current invoicing version.
31
-		update_option( 'wpinv_version', WPINV_VERSION );
32
-
33
-		// Setup the invoice Custom Post Type.
34
-		GetPaid_Post_Types::register_post_types();
35
-
36
-		// Clear the permalinks
37
-		flush_rewrite_rules();
38
-
39
-		// Maybe create new/missing pages.
40
-		$this->create_pages();
41
-
42
-		// Maybe re(add) admin capabilities.
43
-		$this->add_capabilities();
44
-
45
-		// Maybe create the default payment form.
46
-		wpinv_get_default_payment_form();
47
-
48
-		// Create any missing database tables.
49
-		$method = "upgrade_from_$upgrade_from";
50
-
51
-		if ( method_exists( $this, $method ) ) {
52
-			$this->$method();
53
-		}
54
-
55
-	}
56
-
57
-	/**
58
-	 * Do a fresh install.
59
-	 *
60
-	 */
61
-	public function upgrade_from_0() {
62
-		$this->create_subscriptions_table();
63
-		$this->create_invoices_table();
64
-		$this->create_invoice_items_table();
65
-
66
-		// Save default tax rates.
67
-		update_option( 'wpinv_tax_rates', wpinv_get_data( 'tax-rates' ) );
68
-	}
69
-
70
-	/**
71
-	 * Upgrade to 0.0.5
72
-	 *
73
-	 */
74
-	public function upgrade_from_004() {
75
-		global $wpdb;
76
-
77
-		// Invoices.
78
-		$results = $wpdb->get_results( "SELECT ID FROM {$wpdb->posts} WHERE post_type = 'wpi_invoice' AND post_status IN( 'pending', 'processing', 'onhold', 'refunded', 'cancelled', 'failed', 'renewal' )" );
79
-		if ( ! empty( $results ) ) {
80
-			$wpdb->query( "UPDATE {$wpdb->posts} SET post_status = CONCAT( 'wpi-', post_status ) WHERE post_type = 'wpi_invoice' AND post_status IN( 'pending', 'processing', 'onhold', 'refunded', 'cancelled', 'failed', 'renewal' )" );
81
-
82
-			// Clean post cache
83
-			foreach ( $results as $row ) {
84
-				clean_post_cache( $row->ID );
85
-			}
86
-
87
-		}
88
-
89
-		// Item meta key changes
90
-		$query = "SELECT DISTINCT post_id FROM " . $wpdb->postmeta . " WHERE meta_key IN( '_wpinv_item_id', '_wpinv_package_id', '_wpinv_post_id', '_wpinv_cpt_name', '_wpinv_cpt_singular_name' )";
91
-		$results = $wpdb->get_results( $query );
92
-
93
-		if ( ! empty( $results ) ) {
94
-			$wpdb->query( "UPDATE " . $wpdb->postmeta . " SET meta_key = '_wpinv_custom_id' WHERE meta_key IN( '_wpinv_item_id', '_wpinv_package_id', '_wpinv_post_id' )" );
95
-			$wpdb->query( "UPDATE " . $wpdb->postmeta . " SET meta_key = '_wpinv_custom_name' WHERE meta_key = '_wpinv_cpt_name'" );
96
-			$wpdb->query( "UPDATE " . $wpdb->postmeta . " SET meta_key = '_wpinv_custom_singular_name' WHERE meta_key = '_wpinv_cpt_singular_name'" );
97
-
98
-			foreach ( $results as $row ) {
99
-				clean_post_cache( $row->post_id );
100
-			}
101
-
102
-		}
103
-
104
-		$this->upgrade_from_102();
105
-	}
106
-
107
-	/**
108
-	 * Upgrade to 1.0.3
109
-	 *
110
-	 */
111
-	public function upgrade_from_102() {
112
-		$this->create_subscriptions_table();
113
-		$this->upgrade_from_118();
114
-	}
115
-
116
-	/**
117
-	 * Upgrade to version 2.0.0.
118
-	 *
119
-	 */
120
-	public function upgrade_from_118() {
121
-		$this->create_invoices_table();
122
-		$this->create_invoice_items_table();
123
-		$this->migrate_old_invoices();
124
-	}
125
-
126
-	/**
127
-	 * Upgrade to version 2.0.8.
128
-	 *
129
-	 */
130
-	public function upgrade_from_207() {
131
-		global $wpdb;
132
-		$wpdb->query( "ALTER TABLE {$wpdb->prefix}getpaid_invoice_items MODIFY COLUMN quantity FLOAT(20);" );
133
-	}
134
-
135
-	/**
136
-	 * Give administrators the capability to manage GetPaid.
137
-	 *
138
-	 */
139
-	public function add_capabilities() {
140
-		$GLOBALS['wp_roles']->add_cap( 'administrator', 'manage_invoicing' );
141
-	}
142
-
143
-	/**
144
-	 * Retreives GetPaid pages.
145
-	 *
146
-	 */
147
-	public static function get_pages() {
148
-
149
-		return apply_filters(
150
-			'wpinv_create_pages',
151
-			array(
152
-
153
-				// Checkout page.
154
-				'checkout_page' => array(
155
-					'name'      => _x( 'gp-checkout', 'Page slug', 'invoicing' ),
156
-					'title'     => _x( 'Checkout', 'Page title', 'invoicing' ),
157
-					'content'   => '
23
+    /**
24
+     * Upgrades the install.
25
+     *
26
+     * @param string $upgrade_from The current invoicing version.
27
+     */
28
+    public function upgrade_db( $upgrade_from ) {
29
+
30
+        // Save the current invoicing version.
31
+        update_option( 'wpinv_version', WPINV_VERSION );
32
+
33
+        // Setup the invoice Custom Post Type.
34
+        GetPaid_Post_Types::register_post_types();
35
+
36
+        // Clear the permalinks
37
+        flush_rewrite_rules();
38
+
39
+        // Maybe create new/missing pages.
40
+        $this->create_pages();
41
+
42
+        // Maybe re(add) admin capabilities.
43
+        $this->add_capabilities();
44
+
45
+        // Maybe create the default payment form.
46
+        wpinv_get_default_payment_form();
47
+
48
+        // Create any missing database tables.
49
+        $method = "upgrade_from_$upgrade_from";
50
+
51
+        if ( method_exists( $this, $method ) ) {
52
+            $this->$method();
53
+        }
54
+
55
+    }
56
+
57
+    /**
58
+     * Do a fresh install.
59
+     *
60
+     */
61
+    public function upgrade_from_0() {
62
+        $this->create_subscriptions_table();
63
+        $this->create_invoices_table();
64
+        $this->create_invoice_items_table();
65
+
66
+        // Save default tax rates.
67
+        update_option( 'wpinv_tax_rates', wpinv_get_data( 'tax-rates' ) );
68
+    }
69
+
70
+    /**
71
+     * Upgrade to 0.0.5
72
+     *
73
+     */
74
+    public function upgrade_from_004() {
75
+        global $wpdb;
76
+
77
+        // Invoices.
78
+        $results = $wpdb->get_results( "SELECT ID FROM {$wpdb->posts} WHERE post_type = 'wpi_invoice' AND post_status IN( 'pending', 'processing', 'onhold', 'refunded', 'cancelled', 'failed', 'renewal' )" );
79
+        if ( ! empty( $results ) ) {
80
+            $wpdb->query( "UPDATE {$wpdb->posts} SET post_status = CONCAT( 'wpi-', post_status ) WHERE post_type = 'wpi_invoice' AND post_status IN( 'pending', 'processing', 'onhold', 'refunded', 'cancelled', 'failed', 'renewal' )" );
81
+
82
+            // Clean post cache
83
+            foreach ( $results as $row ) {
84
+                clean_post_cache( $row->ID );
85
+            }
86
+
87
+        }
88
+
89
+        // Item meta key changes
90
+        $query = "SELECT DISTINCT post_id FROM " . $wpdb->postmeta . " WHERE meta_key IN( '_wpinv_item_id', '_wpinv_package_id', '_wpinv_post_id', '_wpinv_cpt_name', '_wpinv_cpt_singular_name' )";
91
+        $results = $wpdb->get_results( $query );
92
+
93
+        if ( ! empty( $results ) ) {
94
+            $wpdb->query( "UPDATE " . $wpdb->postmeta . " SET meta_key = '_wpinv_custom_id' WHERE meta_key IN( '_wpinv_item_id', '_wpinv_package_id', '_wpinv_post_id' )" );
95
+            $wpdb->query( "UPDATE " . $wpdb->postmeta . " SET meta_key = '_wpinv_custom_name' WHERE meta_key = '_wpinv_cpt_name'" );
96
+            $wpdb->query( "UPDATE " . $wpdb->postmeta . " SET meta_key = '_wpinv_custom_singular_name' WHERE meta_key = '_wpinv_cpt_singular_name'" );
97
+
98
+            foreach ( $results as $row ) {
99
+                clean_post_cache( $row->post_id );
100
+            }
101
+
102
+        }
103
+
104
+        $this->upgrade_from_102();
105
+    }
106
+
107
+    /**
108
+     * Upgrade to 1.0.3
109
+     *
110
+     */
111
+    public function upgrade_from_102() {
112
+        $this->create_subscriptions_table();
113
+        $this->upgrade_from_118();
114
+    }
115
+
116
+    /**
117
+     * Upgrade to version 2.0.0.
118
+     *
119
+     */
120
+    public function upgrade_from_118() {
121
+        $this->create_invoices_table();
122
+        $this->create_invoice_items_table();
123
+        $this->migrate_old_invoices();
124
+    }
125
+
126
+    /**
127
+     * Upgrade to version 2.0.8.
128
+     *
129
+     */
130
+    public function upgrade_from_207() {
131
+        global $wpdb;
132
+        $wpdb->query( "ALTER TABLE {$wpdb->prefix}getpaid_invoice_items MODIFY COLUMN quantity FLOAT(20);" );
133
+    }
134
+
135
+    /**
136
+     * Give administrators the capability to manage GetPaid.
137
+     *
138
+     */
139
+    public function add_capabilities() {
140
+        $GLOBALS['wp_roles']->add_cap( 'administrator', 'manage_invoicing' );
141
+    }
142
+
143
+    /**
144
+     * Retreives GetPaid pages.
145
+     *
146
+     */
147
+    public static function get_pages() {
148
+
149
+        return apply_filters(
150
+            'wpinv_create_pages',
151
+            array(
152
+
153
+                // Checkout page.
154
+                'checkout_page' => array(
155
+                    'name'      => _x( 'gp-checkout', 'Page slug', 'invoicing' ),
156
+                    'title'     => _x( 'Checkout', 'Page title', 'invoicing' ),
157
+                    'content'   => '
158 158
 						<!-- wp:shortcode -->
159 159
 						[wpinv_checkout]
160 160
 						<!-- /wp:shortcode -->
161 161
 					',
162
-					'parent'    => '',
163
-				),
164
-
165
-				// Invoice history page.
166
-				'invoice_history_page' => array(
167
-					'name'    => _x( 'gp-invoices', 'Page slug', 'invoicing' ),
168
-					'title'   => _x( 'My Invoices', 'Page title', 'invoicing' ),
169
-					'content' => '
162
+                    'parent'    => '',
163
+                ),
164
+
165
+                // Invoice history page.
166
+                'invoice_history_page' => array(
167
+                    'name'    => _x( 'gp-invoices', 'Page slug', 'invoicing' ),
168
+                    'title'   => _x( 'My Invoices', 'Page title', 'invoicing' ),
169
+                    'content' => '
170 170
 					<!-- wp:shortcode -->
171 171
 					[wpinv_history]
172 172
 					<!-- /wp:shortcode -->
173 173
 				',
174
-					'parent'  => '',
175
-				),
176
-
177
-				// Success page content.
178
-				'success_page' => array(
179
-					'name'     => _x( 'gp-receipt', 'Page slug', 'invoicing' ),
180
-					'title'    => _x( 'Payment Confirmation', 'Page title', 'invoicing' ),
181
-					'content'  => '
174
+                    'parent'  => '',
175
+                ),
176
+
177
+                // Success page content.
178
+                'success_page' => array(
179
+                    'name'     => _x( 'gp-receipt', 'Page slug', 'invoicing' ),
180
+                    'title'    => _x( 'Payment Confirmation', 'Page title', 'invoicing' ),
181
+                    'content'  => '
182 182
 					<!-- wp:shortcode -->
183 183
 					[wpinv_receipt]
184 184
 					<!-- /wp:shortcode -->
185 185
 				',
186
-					'parent'   => 'gp-checkout',
187
-				),
188
-
189
-				// Failure page content.
190
-				'failure_page' => array(
191
-					'name'    => _x( 'gp-transaction-failed', 'Page slug', 'invoicing' ),
192
-					'title'   => _x( 'Transaction Failed', 'Page title', 'invoicing' ),
193
-					'content' => __( 'Your transaction failed, please try again or contact site support.', 'invoicing' ),
194
-					'parent'  => 'gp-checkout',
195
-				),
196
-
197
-				// Subscriptions history page.
198
-				'invoice_subscription_page' => array(
199
-					'name'    => _x( 'gp-subscriptions', 'Page slug', 'invoicing' ),
200
-					'title'   => _x( 'My Subscriptions', 'Page title', 'invoicing' ),
201
-					'content' => '
186
+                    'parent'   => 'gp-checkout',
187
+                ),
188
+
189
+                // Failure page content.
190
+                'failure_page' => array(
191
+                    'name'    => _x( 'gp-transaction-failed', 'Page slug', 'invoicing' ),
192
+                    'title'   => _x( 'Transaction Failed', 'Page title', 'invoicing' ),
193
+                    'content' => __( 'Your transaction failed, please try again or contact site support.', 'invoicing' ),
194
+                    'parent'  => 'gp-checkout',
195
+                ),
196
+
197
+                // Subscriptions history page.
198
+                'invoice_subscription_page' => array(
199
+                    'name'    => _x( 'gp-subscriptions', 'Page slug', 'invoicing' ),
200
+                    'title'   => _x( 'My Subscriptions', 'Page title', 'invoicing' ),
201
+                    'content' => '
202 202
 					<!-- wp:shortcode -->
203 203
 					[wpinv_subscriptions]
204 204
 					<!-- /wp:shortcode -->
205 205
 				',
206
-					'parent' => '',
207
-				),
206
+                    'parent' => '',
207
+                ),
208 208
 
209
-			)
210
-		);
209
+            )
210
+        );
211 211
 
212
-	}
212
+    }
213 213
 
214
-	/**
215
-	 * Re-create GetPaid pages.
216
-	 *
217
-	 */
218
-	public function create_pages() {
214
+    /**
215
+     * Re-create GetPaid pages.
216
+     *
217
+     */
218
+    public function create_pages() {
219 219
 
220
-		foreach ( self::get_pages() as $key => $page ) {
221
-			wpinv_create_page( esc_sql( $page['name'] ), $key, $page['title'], $page['content'], $page['parent'] );
222
-		}
220
+        foreach ( self::get_pages() as $key => $page ) {
221
+            wpinv_create_page( esc_sql( $page['name'] ), $key, $page['title'], $page['content'], $page['parent'] );
222
+        }
223 223
 
224
-	}
224
+    }
225 225
 
226
-	/**
227
-	 * Create subscriptions table.
228
-	 *
229
-	 */
230
-	public function create_subscriptions_table() {
226
+    /**
227
+     * Create subscriptions table.
228
+     *
229
+     */
230
+    public function create_subscriptions_table() {
231 231
 
232
-		global $wpdb;
232
+        global $wpdb;
233 233
 
234
-		require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
234
+        require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
235 235
 
236
-		// Create tables.
237
-		$charset_collate = $wpdb->get_charset_collate();
238
-		$sql             = "CREATE TABLE IF NOT EXISTS {$wpdb->prefix}wpinv_subscriptions (
236
+        // Create tables.
237
+        $charset_collate = $wpdb->get_charset_collate();
238
+        $sql             = "CREATE TABLE IF NOT EXISTS {$wpdb->prefix}wpinv_subscriptions (
239 239
 			id bigint(20) unsigned NOT NULL auto_increment,
240 240
 			customer_id bigint(20) NOT NULL,
241 241
 			frequency int(11) NOT NULL DEFAULT '1',
@@ -258,22 +258,22 @@  discard block
 block discarded – undo
258 258
 			KEY customer_and_status (customer_id, status)
259 259
 		  ) $charset_collate;";
260 260
 
261
-		dbDelta( $sql );
261
+        dbDelta( $sql );
262 262
 
263
-	}
263
+    }
264 264
 
265
-	/**
266
-	 * Create invoices table.
267
-	 *
268
-	 */
269
-	public function create_invoices_table() {
270
-		global $wpdb;
265
+    /**
266
+     * Create invoices table.
267
+     *
268
+     */
269
+    public function create_invoices_table() {
270
+        global $wpdb;
271 271
 
272
-		require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
272
+        require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
273 273
 
274
-		// Create tables.
275
-		$charset_collate = $wpdb->get_charset_collate();
276
-		$sql             = "CREATE TABLE IF NOT EXISTS {$wpdb->prefix}getpaid_invoices (
274
+        // Create tables.
275
+        $charset_collate = $wpdb->get_charset_collate();
276
+        $sql             = "CREATE TABLE IF NOT EXISTS {$wpdb->prefix}getpaid_invoices (
277 277
 			post_id BIGINT(20) NOT NULL,
278 278
             `number` VARCHAR(100),
279 279
             `key` VARCHAR(100),
@@ -309,22 +309,22 @@  discard block
 block discarded – undo
309 309
 			KEY `key` (`key`)
310 310
 		  ) $charset_collate;";
311 311
 
312
-		dbDelta( $sql );
312
+        dbDelta( $sql );
313 313
 
314
-	}
314
+    }
315 315
 
316
-	/**
317
-	 * Create invoice items table.
318
-	 *
319
-	 */
320
-	public function create_invoice_items_table() {
321
-		global $wpdb;
316
+    /**
317
+     * Create invoice items table.
318
+     *
319
+     */
320
+    public function create_invoice_items_table() {
321
+        global $wpdb;
322 322
 
323
-		require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
323
+        require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
324 324
 
325
-		// Create tables.
326
-		$charset_collate = $wpdb->get_charset_collate();
327
-		$sql             = "CREATE TABLE IF NOT EXISTS {$wpdb->prefix}getpaid_invoice_items (
325
+        // Create tables.
326
+        $charset_collate = $wpdb->get_charset_collate();
327
+        $sql             = "CREATE TABLE IF NOT EXISTS {$wpdb->prefix}getpaid_invoice_items (
328 328
 			ID BIGINT(20) NOT NULL AUTO_INCREMENT,
329 329
             post_id BIGINT(20) NOT NULL,
330 330
             item_id BIGINT(20) NOT NULL,
@@ -346,159 +346,159 @@  discard block
 block discarded – undo
346 346
 			KEY post_id (post_id)
347 347
 		  ) $charset_collate;";
348 348
 
349
-		dbDelta( $sql );
350
-
351
-	}
352
-
353
-	/**
354
-	 * Migrates old invoices to new invoices.
355
-	 *
356
-	 */
357
-	public function migrate_old_invoices() {
358
-		global $wpdb;
359
-
360
-		$invoices_table      = $wpdb->prefix . 'getpaid_invoices';
361
-		$invoice_items_table = $wpdb->prefix . 'getpaid_invoice_items';
362
-		$migrated            = $wpdb->get_col( "SELECT post_id FROM $invoices_table" );
363
-		$invoices            = array_unique(
364
-			get_posts(
365
-				array(
366
-					'post_type'      => array( 'wpi_invoice', 'wpi_quote' ),
367
-					'posts_per_page' => -1,
368
-					'fields'         => 'ids',
369
-					'post_status'    => array_keys( get_post_stati() ),
370
-					'exclude'        => (array) $migrated,
371
-				)
372
-			)
373
-		);
374
-
375
-		// Abort if we do not have any invoices.
376
-		if ( empty( $invoices ) ) {
377
-			return;
378
-		}
379
-
380
-		require_once( WPINV_PLUGIN_DIR . 'includes/class-wpinv-legacy-invoice.php' );
381
-
382
-		$invoice_rows = array();
383
-		foreach ( $invoices as $invoice ) {
384
-
385
-			$invoice = new WPInv_Legacy_Invoice( $invoice );
386
-
387
-			if ( empty( $invoice->ID ) ) {
388
-				return;
389
-			}
390
-
391
-			$fields = array (
392
-				'post_id'        => $invoice->ID,
393
-				'number'         => $invoice->get_number(),
394
-				'key'            => $invoice->get_key(),
395
-				'type'           => str_replace( 'wpi_', '', $invoice->post_type ),
396
-				'mode'           => $invoice->mode,
397
-				'user_ip'        => $invoice->get_ip(),
398
-				'first_name'     => $invoice->get_first_name(),
399
-				'last_name'      => $invoice->get_last_name(),
400
-				'address'        => $invoice->get_address(),
401
-				'city'           => $invoice->city,
402
-				'state'          => $invoice->state,
403
-				'country'        => $invoice->country,
404
-				'zip'            => $invoice->zip,
405
-				'adddress_confirmed' => (int) $invoice->adddress_confirmed,
406
-				'gateway'        => $invoice->get_gateway(),
407
-				'transaction_id' => $invoice->get_transaction_id(),
408
-				'currency'       => $invoice->get_currency(),
409
-				'subtotal'       => $invoice->get_subtotal(),
410
-				'tax'            => $invoice->get_tax(),
411
-				'fees_total'     => $invoice->get_fees_total(),
412
-				'total'          => $invoice->get_total(),
413
-				'discount'       => $invoice->get_discount(),
414
-				'discount_code'  => $invoice->get_discount_code(),
415
-				'disable_taxes'  => $invoice->disable_taxes,
416
-				'due_date'       => $invoice->get_due_date(),
417
-				'completed_date' => $invoice->get_completed_date(),
418
-				'company'        => $invoice->company,
419
-				'vat_number'     => $invoice->vat_number,
420
-				'vat_rate'       => $invoice->vat_rate,
421
-				'custom_meta'    => $invoice->payment_meta
422
-			);
423
-
424
-			foreach ( $fields as $key => $val ) {
425
-				if ( is_null( $val ) ) {
426
-					$val = '';
427
-				}
428
-				$val = maybe_serialize( $val );
429
-				$fields[ $key ] = $wpdb->prepare( '%s', $val );
430
-			}
431
-
432
-			$fields = implode( ', ', $fields );
433
-			$invoice_rows[] = "($fields)";
434
-
435
-			$item_rows    = array();
436
-			$item_columns = array();
437
-			foreach ( $invoice->get_cart_details() as $details ) {
438
-				$fields = array(
439
-					'post_id'          => $invoice->ID,
440
-					'item_id'          => $details['id'],
441
-					'item_name'        => $details['name'],
442
-					'item_description' => empty( $details['meta']['description'] ) ? '' : $details['meta']['description'],
443
-					'vat_rate'         => $details['vat_rate'],
444
-					'vat_class'        => empty( $details['vat_class'] ) ? '_standard' : $details['vat_class'],
445
-					'tax'              => $details['tax'],
446
-					'item_price'       => $details['item_price'],
447
-					'custom_price'     => $details['custom_price'],
448
-					'quantity'         => $details['quantity'],
449
-					'discount'         => $details['discount'],
450
-					'subtotal'         => $details['subtotal'],
451
-					'price'            => $details['price'],
452
-					'meta'             => $details['meta'],
453
-					'fees'             => $details['fees'],
454
-				);
455
-
456
-				$item_columns = array_keys ( $fields );
457
-
458
-				foreach ( $fields as $key => $val ) {
459
-					if ( is_null( $val ) ) {
460
-						$val = '';
461
-					}
462
-					$val = maybe_serialize( $val );
463
-					$fields[ $key ] = $wpdb->prepare( '%s', $val );
464
-				}
465
-
466
-				$fields = implode( ', ', $fields );
467
-				$item_rows[] = "($fields)";
468
-			}
469
-
470
-			$item_rows    = implode( ', ', $item_rows );
471
-			$item_columns = implode( ', ', $item_columns );
472
-			$wpdb->query( "INSERT INTO $invoice_items_table ($item_columns) VALUES $item_rows" );
473
-		}
474
-
475
-		if ( empty( $invoice_rows ) ) {
476
-			return;
477
-		}
478
-
479
-		$invoice_rows = implode( ', ', $invoice_rows );
480
-		$wpdb->query( "INSERT INTO $invoices_table VALUES $invoice_rows" );
481
-
482
-	}
483
-
484
-	/**
485
-	 * Migrates old invoices to new invoices.
486
-	 *
487
-	 */
488
-	public static function rename_gateways_label() {
489
-		global $wpdb;
490
-
491
-		foreach ( array_keys( wpinv_get_payment_gateways() ) as $gateway ) {
492
-
493
-			$wpdb->update(
494
-				$wpdb->prefix . 'getpaid_invoices',
495
-				array( 'gateway' => $gateway ),
496
-				array( 'gateway' => wpinv_get_gateway_admin_label( $gateway ) ),
497
-				'%s',
498
-				'%s'
499
-			);
500
-
501
-		}
502
-	}
349
+        dbDelta( $sql );
350
+
351
+    }
352
+
353
+    /**
354
+     * Migrates old invoices to new invoices.
355
+     *
356
+     */
357
+    public function migrate_old_invoices() {
358
+        global $wpdb;
359
+
360
+        $invoices_table      = $wpdb->prefix . 'getpaid_invoices';
361
+        $invoice_items_table = $wpdb->prefix . 'getpaid_invoice_items';
362
+        $migrated            = $wpdb->get_col( "SELECT post_id FROM $invoices_table" );
363
+        $invoices            = array_unique(
364
+            get_posts(
365
+                array(
366
+                    'post_type'      => array( 'wpi_invoice', 'wpi_quote' ),
367
+                    'posts_per_page' => -1,
368
+                    'fields'         => 'ids',
369
+                    'post_status'    => array_keys( get_post_stati() ),
370
+                    'exclude'        => (array) $migrated,
371
+                )
372
+            )
373
+        );
374
+
375
+        // Abort if we do not have any invoices.
376
+        if ( empty( $invoices ) ) {
377
+            return;
378
+        }
379
+
380
+        require_once( WPINV_PLUGIN_DIR . 'includes/class-wpinv-legacy-invoice.php' );
381
+
382
+        $invoice_rows = array();
383
+        foreach ( $invoices as $invoice ) {
384
+
385
+            $invoice = new WPInv_Legacy_Invoice( $invoice );
386
+
387
+            if ( empty( $invoice->ID ) ) {
388
+                return;
389
+            }
390
+
391
+            $fields = array (
392
+                'post_id'        => $invoice->ID,
393
+                'number'         => $invoice->get_number(),
394
+                'key'            => $invoice->get_key(),
395
+                'type'           => str_replace( 'wpi_', '', $invoice->post_type ),
396
+                'mode'           => $invoice->mode,
397
+                'user_ip'        => $invoice->get_ip(),
398
+                'first_name'     => $invoice->get_first_name(),
399
+                'last_name'      => $invoice->get_last_name(),
400
+                'address'        => $invoice->get_address(),
401
+                'city'           => $invoice->city,
402
+                'state'          => $invoice->state,
403
+                'country'        => $invoice->country,
404
+                'zip'            => $invoice->zip,
405
+                'adddress_confirmed' => (int) $invoice->adddress_confirmed,
406
+                'gateway'        => $invoice->get_gateway(),
407
+                'transaction_id' => $invoice->get_transaction_id(),
408
+                'currency'       => $invoice->get_currency(),
409
+                'subtotal'       => $invoice->get_subtotal(),
410
+                'tax'            => $invoice->get_tax(),
411
+                'fees_total'     => $invoice->get_fees_total(),
412
+                'total'          => $invoice->get_total(),
413
+                'discount'       => $invoice->get_discount(),
414
+                'discount_code'  => $invoice->get_discount_code(),
415
+                'disable_taxes'  => $invoice->disable_taxes,
416
+                'due_date'       => $invoice->get_due_date(),
417
+                'completed_date' => $invoice->get_completed_date(),
418
+                'company'        => $invoice->company,
419
+                'vat_number'     => $invoice->vat_number,
420
+                'vat_rate'       => $invoice->vat_rate,
421
+                'custom_meta'    => $invoice->payment_meta
422
+            );
423
+
424
+            foreach ( $fields as $key => $val ) {
425
+                if ( is_null( $val ) ) {
426
+                    $val = '';
427
+                }
428
+                $val = maybe_serialize( $val );
429
+                $fields[ $key ] = $wpdb->prepare( '%s', $val );
430
+            }
431
+
432
+            $fields = implode( ', ', $fields );
433
+            $invoice_rows[] = "($fields)";
434
+
435
+            $item_rows    = array();
436
+            $item_columns = array();
437
+            foreach ( $invoice->get_cart_details() as $details ) {
438
+                $fields = array(
439
+                    'post_id'          => $invoice->ID,
440
+                    'item_id'          => $details['id'],
441
+                    'item_name'        => $details['name'],
442
+                    'item_description' => empty( $details['meta']['description'] ) ? '' : $details['meta']['description'],
443
+                    'vat_rate'         => $details['vat_rate'],
444
+                    'vat_class'        => empty( $details['vat_class'] ) ? '_standard' : $details['vat_class'],
445
+                    'tax'              => $details['tax'],
446
+                    'item_price'       => $details['item_price'],
447
+                    'custom_price'     => $details['custom_price'],
448
+                    'quantity'         => $details['quantity'],
449
+                    'discount'         => $details['discount'],
450
+                    'subtotal'         => $details['subtotal'],
451
+                    'price'            => $details['price'],
452
+                    'meta'             => $details['meta'],
453
+                    'fees'             => $details['fees'],
454
+                );
455
+
456
+                $item_columns = array_keys ( $fields );
457
+
458
+                foreach ( $fields as $key => $val ) {
459
+                    if ( is_null( $val ) ) {
460
+                        $val = '';
461
+                    }
462
+                    $val = maybe_serialize( $val );
463
+                    $fields[ $key ] = $wpdb->prepare( '%s', $val );
464
+                }
465
+
466
+                $fields = implode( ', ', $fields );
467
+                $item_rows[] = "($fields)";
468
+            }
469
+
470
+            $item_rows    = implode( ', ', $item_rows );
471
+            $item_columns = implode( ', ', $item_columns );
472
+            $wpdb->query( "INSERT INTO $invoice_items_table ($item_columns) VALUES $item_rows" );
473
+        }
474
+
475
+        if ( empty( $invoice_rows ) ) {
476
+            return;
477
+        }
478
+
479
+        $invoice_rows = implode( ', ', $invoice_rows );
480
+        $wpdb->query( "INSERT INTO $invoices_table VALUES $invoice_rows" );
481
+
482
+    }
483
+
484
+    /**
485
+     * Migrates old invoices to new invoices.
486
+     *
487
+     */
488
+    public static function rename_gateways_label() {
489
+        global $wpdb;
490
+
491
+        foreach ( array_keys( wpinv_get_payment_gateways() ) as $gateway ) {
492
+
493
+            $wpdb->update(
494
+                $wpdb->prefix . 'getpaid_invoices',
495
+                array( 'gateway' => $gateway ),
496
+                array( 'gateway' => wpinv_get_gateway_admin_label( $gateway ) ),
497
+                '%s',
498
+                '%s'
499
+            );
500
+
501
+        }
502
+    }
503 503
 
504 504
 }
Please login to merge, or discard this patch.
Spacing   +71 added lines, -71 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  * @since   2.0.2
9 9
  */
10 10
 
11
-defined( 'ABSPATH' ) || exit;
11
+defined('ABSPATH') || exit;
12 12
 
13 13
 /**
14 14
  * The main installer/updater class.
@@ -25,10 +25,10 @@  discard block
 block discarded – undo
25 25
 	 *
26 26
 	 * @param string $upgrade_from The current invoicing version.
27 27
 	 */
28
-	public function upgrade_db( $upgrade_from ) {
28
+	public function upgrade_db($upgrade_from) {
29 29
 
30 30
 		// Save the current invoicing version.
31
-		update_option( 'wpinv_version', WPINV_VERSION );
31
+		update_option('wpinv_version', WPINV_VERSION);
32 32
 
33 33
 		// Setup the invoice Custom Post Type.
34 34
 		GetPaid_Post_Types::register_post_types();
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 		// Create any missing database tables.
49 49
 		$method = "upgrade_from_$upgrade_from";
50 50
 
51
-		if ( method_exists( $this, $method ) ) {
51
+		if (method_exists($this, $method)) {
52 52
 			$this->$method();
53 53
 		}
54 54
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 		$this->create_invoice_items_table();
65 65
 
66 66
 		// Save default tax rates.
67
-		update_option( 'wpinv_tax_rates', wpinv_get_data( 'tax-rates' ) );
67
+		update_option('wpinv_tax_rates', wpinv_get_data('tax-rates'));
68 68
 	}
69 69
 
70 70
 	/**
@@ -75,28 +75,28 @@  discard block
 block discarded – undo
75 75
 		global $wpdb;
76 76
 
77 77
 		// Invoices.
78
-		$results = $wpdb->get_results( "SELECT ID FROM {$wpdb->posts} WHERE post_type = 'wpi_invoice' AND post_status IN( 'pending', 'processing', 'onhold', 'refunded', 'cancelled', 'failed', 'renewal' )" );
79
-		if ( ! empty( $results ) ) {
80
-			$wpdb->query( "UPDATE {$wpdb->posts} SET post_status = CONCAT( 'wpi-', post_status ) WHERE post_type = 'wpi_invoice' AND post_status IN( 'pending', 'processing', 'onhold', 'refunded', 'cancelled', 'failed', 'renewal' )" );
78
+		$results = $wpdb->get_results("SELECT ID FROM {$wpdb->posts} WHERE post_type = 'wpi_invoice' AND post_status IN( 'pending', 'processing', 'onhold', 'refunded', 'cancelled', 'failed', 'renewal' )");
79
+		if (!empty($results)) {
80
+			$wpdb->query("UPDATE {$wpdb->posts} SET post_status = CONCAT( 'wpi-', post_status ) WHERE post_type = 'wpi_invoice' AND post_status IN( 'pending', 'processing', 'onhold', 'refunded', 'cancelled', 'failed', 'renewal' )");
81 81
 
82 82
 			// Clean post cache
83
-			foreach ( $results as $row ) {
84
-				clean_post_cache( $row->ID );
83
+			foreach ($results as $row) {
84
+				clean_post_cache($row->ID);
85 85
 			}
86 86
 
87 87
 		}
88 88
 
89 89
 		// Item meta key changes
90 90
 		$query = "SELECT DISTINCT post_id FROM " . $wpdb->postmeta . " WHERE meta_key IN( '_wpinv_item_id', '_wpinv_package_id', '_wpinv_post_id', '_wpinv_cpt_name', '_wpinv_cpt_singular_name' )";
91
-		$results = $wpdb->get_results( $query );
91
+		$results = $wpdb->get_results($query);
92 92
 
93
-		if ( ! empty( $results ) ) {
94
-			$wpdb->query( "UPDATE " . $wpdb->postmeta . " SET meta_key = '_wpinv_custom_id' WHERE meta_key IN( '_wpinv_item_id', '_wpinv_package_id', '_wpinv_post_id' )" );
95
-			$wpdb->query( "UPDATE " . $wpdb->postmeta . " SET meta_key = '_wpinv_custom_name' WHERE meta_key = '_wpinv_cpt_name'" );
96
-			$wpdb->query( "UPDATE " . $wpdb->postmeta . " SET meta_key = '_wpinv_custom_singular_name' WHERE meta_key = '_wpinv_cpt_singular_name'" );
93
+		if (!empty($results)) {
94
+			$wpdb->query("UPDATE " . $wpdb->postmeta . " SET meta_key = '_wpinv_custom_id' WHERE meta_key IN( '_wpinv_item_id', '_wpinv_package_id', '_wpinv_post_id' )");
95
+			$wpdb->query("UPDATE " . $wpdb->postmeta . " SET meta_key = '_wpinv_custom_name' WHERE meta_key = '_wpinv_cpt_name'");
96
+			$wpdb->query("UPDATE " . $wpdb->postmeta . " SET meta_key = '_wpinv_custom_singular_name' WHERE meta_key = '_wpinv_cpt_singular_name'");
97 97
 
98
-			foreach ( $results as $row ) {
99
-				clean_post_cache( $row->post_id );
98
+			foreach ($results as $row) {
99
+				clean_post_cache($row->post_id);
100 100
 			}
101 101
 
102 102
 		}
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 	 */
130 130
 	public function upgrade_from_207() {
131 131
 		global $wpdb;
132
-		$wpdb->query( "ALTER TABLE {$wpdb->prefix}getpaid_invoice_items MODIFY COLUMN quantity FLOAT(20);" );
132
+		$wpdb->query("ALTER TABLE {$wpdb->prefix}getpaid_invoice_items MODIFY COLUMN quantity FLOAT(20);");
133 133
 	}
134 134
 
135 135
 	/**
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 	 *
138 138
 	 */
139 139
 	public function add_capabilities() {
140
-		$GLOBALS['wp_roles']->add_cap( 'administrator', 'manage_invoicing' );
140
+		$GLOBALS['wp_roles']->add_cap('administrator', 'manage_invoicing');
141 141
 	}
142 142
 
143 143
 	/**
@@ -152,8 +152,8 @@  discard block
 block discarded – undo
152 152
 
153 153
 				// Checkout page.
154 154
 				'checkout_page' => array(
155
-					'name'      => _x( 'gp-checkout', 'Page slug', 'invoicing' ),
156
-					'title'     => _x( 'Checkout', 'Page title', 'invoicing' ),
155
+					'name'      => _x('gp-checkout', 'Page slug', 'invoicing'),
156
+					'title'     => _x('Checkout', 'Page title', 'invoicing'),
157 157
 					'content'   => '
158 158
 						<!-- wp:shortcode -->
159 159
 						[wpinv_checkout]
@@ -164,8 +164,8 @@  discard block
 block discarded – undo
164 164
 
165 165
 				// Invoice history page.
166 166
 				'invoice_history_page' => array(
167
-					'name'    => _x( 'gp-invoices', 'Page slug', 'invoicing' ),
168
-					'title'   => _x( 'My Invoices', 'Page title', 'invoicing' ),
167
+					'name'    => _x('gp-invoices', 'Page slug', 'invoicing'),
168
+					'title'   => _x('My Invoices', 'Page title', 'invoicing'),
169 169
 					'content' => '
170 170
 					<!-- wp:shortcode -->
171 171
 					[wpinv_history]
@@ -176,8 +176,8 @@  discard block
 block discarded – undo
176 176
 
177 177
 				// Success page content.
178 178
 				'success_page' => array(
179
-					'name'     => _x( 'gp-receipt', 'Page slug', 'invoicing' ),
180
-					'title'    => _x( 'Payment Confirmation', 'Page title', 'invoicing' ),
179
+					'name'     => _x('gp-receipt', 'Page slug', 'invoicing'),
180
+					'title'    => _x('Payment Confirmation', 'Page title', 'invoicing'),
181 181
 					'content'  => '
182 182
 					<!-- wp:shortcode -->
183 183
 					[wpinv_receipt]
@@ -188,16 +188,16 @@  discard block
 block discarded – undo
188 188
 
189 189
 				// Failure page content.
190 190
 				'failure_page' => array(
191
-					'name'    => _x( 'gp-transaction-failed', 'Page slug', 'invoicing' ),
192
-					'title'   => _x( 'Transaction Failed', 'Page title', 'invoicing' ),
193
-					'content' => __( 'Your transaction failed, please try again or contact site support.', 'invoicing' ),
191
+					'name'    => _x('gp-transaction-failed', 'Page slug', 'invoicing'),
192
+					'title'   => _x('Transaction Failed', 'Page title', 'invoicing'),
193
+					'content' => __('Your transaction failed, please try again or contact site support.', 'invoicing'),
194 194
 					'parent'  => 'gp-checkout',
195 195
 				),
196 196
 
197 197
 				// Subscriptions history page.
198 198
 				'invoice_subscription_page' => array(
199
-					'name'    => _x( 'gp-subscriptions', 'Page slug', 'invoicing' ),
200
-					'title'   => _x( 'My Subscriptions', 'Page title', 'invoicing' ),
199
+					'name'    => _x('gp-subscriptions', 'Page slug', 'invoicing'),
200
+					'title'   => _x('My Subscriptions', 'Page title', 'invoicing'),
201 201
 					'content' => '
202 202
 					<!-- wp:shortcode -->
203 203
 					[wpinv_subscriptions]
@@ -217,8 +217,8 @@  discard block
 block discarded – undo
217 217
 	 */
218 218
 	public function create_pages() {
219 219
 
220
-		foreach ( self::get_pages() as $key => $page ) {
221
-			wpinv_create_page( esc_sql( $page['name'] ), $key, $page['title'], $page['content'], $page['parent'] );
220
+		foreach (self::get_pages() as $key => $page) {
221
+			wpinv_create_page(esc_sql($page['name']), $key, $page['title'], $page['content'], $page['parent']);
222 222
 		}
223 223
 
224 224
 	}
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 
232 232
 		global $wpdb;
233 233
 
234
-		require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
234
+		require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
235 235
 
236 236
 		// Create tables.
237 237
 		$charset_collate = $wpdb->get_charset_collate();
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 			KEY customer_and_status (customer_id, status)
259 259
 		  ) $charset_collate;";
260 260
 
261
-		dbDelta( $sql );
261
+		dbDelta($sql);
262 262
 
263 263
 	}
264 264
 
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
 	public function create_invoices_table() {
270 270
 		global $wpdb;
271 271
 
272
-		require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
272
+		require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
273 273
 
274 274
 		// Create tables.
275 275
 		$charset_collate = $wpdb->get_charset_collate();
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
 			KEY `key` (`key`)
310 310
 		  ) $charset_collate;";
311 311
 
312
-		dbDelta( $sql );
312
+		dbDelta($sql);
313 313
 
314 314
 	}
315 315
 
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
 	public function create_invoice_items_table() {
321 321
 		global $wpdb;
322 322
 
323
-		require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
323
+		require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
324 324
 
325 325
 		// Create tables.
326 326
 		$charset_collate = $wpdb->get_charset_collate();
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
 			KEY post_id (post_id)
347 347
 		  ) $charset_collate;";
348 348
 
349
-		dbDelta( $sql );
349
+		dbDelta($sql);
350 350
 
351 351
 	}
352 352
 
@@ -359,40 +359,40 @@  discard block
 block discarded – undo
359 359
 
360 360
 		$invoices_table      = $wpdb->prefix . 'getpaid_invoices';
361 361
 		$invoice_items_table = $wpdb->prefix . 'getpaid_invoice_items';
362
-		$migrated            = $wpdb->get_col( "SELECT post_id FROM $invoices_table" );
362
+		$migrated            = $wpdb->get_col("SELECT post_id FROM $invoices_table");
363 363
 		$invoices            = array_unique(
364 364
 			get_posts(
365 365
 				array(
366
-					'post_type'      => array( 'wpi_invoice', 'wpi_quote' ),
366
+					'post_type'      => array('wpi_invoice', 'wpi_quote'),
367 367
 					'posts_per_page' => -1,
368 368
 					'fields'         => 'ids',
369
-					'post_status'    => array_keys( get_post_stati() ),
369
+					'post_status'    => array_keys(get_post_stati()),
370 370
 					'exclude'        => (array) $migrated,
371 371
 				)
372 372
 			)
373 373
 		);
374 374
 
375 375
 		// Abort if we do not have any invoices.
376
-		if ( empty( $invoices ) ) {
376
+		if (empty($invoices)) {
377 377
 			return;
378 378
 		}
379 379
 
380
-		require_once( WPINV_PLUGIN_DIR . 'includes/class-wpinv-legacy-invoice.php' );
380
+		require_once(WPINV_PLUGIN_DIR . 'includes/class-wpinv-legacy-invoice.php');
381 381
 
382 382
 		$invoice_rows = array();
383
-		foreach ( $invoices as $invoice ) {
383
+		foreach ($invoices as $invoice) {
384 384
 
385
-			$invoice = new WPInv_Legacy_Invoice( $invoice );
385
+			$invoice = new WPInv_Legacy_Invoice($invoice);
386 386
 
387
-			if ( empty( $invoice->ID ) ) {
387
+			if (empty($invoice->ID)) {
388 388
 				return;
389 389
 			}
390 390
 
391
-			$fields = array (
391
+			$fields = array(
392 392
 				'post_id'        => $invoice->ID,
393 393
 				'number'         => $invoice->get_number(),
394 394
 				'key'            => $invoice->get_key(),
395
-				'type'           => str_replace( 'wpi_', '', $invoice->post_type ),
395
+				'type'           => str_replace('wpi_', '', $invoice->post_type),
396 396
 				'mode'           => $invoice->mode,
397 397
 				'user_ip'        => $invoice->get_ip(),
398 398
 				'first_name'     => $invoice->get_first_name(),
@@ -421,27 +421,27 @@  discard block
 block discarded – undo
421 421
 				'custom_meta'    => $invoice->payment_meta
422 422
 			);
423 423
 
424
-			foreach ( $fields as $key => $val ) {
425
-				if ( is_null( $val ) ) {
424
+			foreach ($fields as $key => $val) {
425
+				if (is_null($val)) {
426 426
 					$val = '';
427 427
 				}
428
-				$val = maybe_serialize( $val );
429
-				$fields[ $key ] = $wpdb->prepare( '%s', $val );
428
+				$val = maybe_serialize($val);
429
+				$fields[$key] = $wpdb->prepare('%s', $val);
430 430
 			}
431 431
 
432
-			$fields = implode( ', ', $fields );
432
+			$fields = implode(', ', $fields);
433 433
 			$invoice_rows[] = "($fields)";
434 434
 
435 435
 			$item_rows    = array();
436 436
 			$item_columns = array();
437
-			foreach ( $invoice->get_cart_details() as $details ) {
437
+			foreach ($invoice->get_cart_details() as $details) {
438 438
 				$fields = array(
439 439
 					'post_id'          => $invoice->ID,
440 440
 					'item_id'          => $details['id'],
441 441
 					'item_name'        => $details['name'],
442
-					'item_description' => empty( $details['meta']['description'] ) ? '' : $details['meta']['description'],
442
+					'item_description' => empty($details['meta']['description']) ? '' : $details['meta']['description'],
443 443
 					'vat_rate'         => $details['vat_rate'],
444
-					'vat_class'        => empty( $details['vat_class'] ) ? '_standard' : $details['vat_class'],
444
+					'vat_class'        => empty($details['vat_class']) ? '_standard' : $details['vat_class'],
445 445
 					'tax'              => $details['tax'],
446 446
 					'item_price'       => $details['item_price'],
447 447
 					'custom_price'     => $details['custom_price'],
@@ -453,31 +453,31 @@  discard block
 block discarded – undo
453 453
 					'fees'             => $details['fees'],
454 454
 				);
455 455
 
456
-				$item_columns = array_keys ( $fields );
456
+				$item_columns = array_keys($fields);
457 457
 
458
-				foreach ( $fields as $key => $val ) {
459
-					if ( is_null( $val ) ) {
458
+				foreach ($fields as $key => $val) {
459
+					if (is_null($val)) {
460 460
 						$val = '';
461 461
 					}
462
-					$val = maybe_serialize( $val );
463
-					$fields[ $key ] = $wpdb->prepare( '%s', $val );
462
+					$val = maybe_serialize($val);
463
+					$fields[$key] = $wpdb->prepare('%s', $val);
464 464
 				}
465 465
 
466
-				$fields = implode( ', ', $fields );
466
+				$fields = implode(', ', $fields);
467 467
 				$item_rows[] = "($fields)";
468 468
 			}
469 469
 
470
-			$item_rows    = implode( ', ', $item_rows );
471
-			$item_columns = implode( ', ', $item_columns );
472
-			$wpdb->query( "INSERT INTO $invoice_items_table ($item_columns) VALUES $item_rows" );
470
+			$item_rows    = implode(', ', $item_rows);
471
+			$item_columns = implode(', ', $item_columns);
472
+			$wpdb->query("INSERT INTO $invoice_items_table ($item_columns) VALUES $item_rows");
473 473
 		}
474 474
 
475
-		if ( empty( $invoice_rows ) ) {
475
+		if (empty($invoice_rows)) {
476 476
 			return;
477 477
 		}
478 478
 
479
-		$invoice_rows = implode( ', ', $invoice_rows );
480
-		$wpdb->query( "INSERT INTO $invoices_table VALUES $invoice_rows" );
479
+		$invoice_rows = implode(', ', $invoice_rows);
480
+		$wpdb->query("INSERT INTO $invoices_table VALUES $invoice_rows");
481 481
 
482 482
 	}
483 483
 
@@ -488,12 +488,12 @@  discard block
 block discarded – undo
488 488
 	public static function rename_gateways_label() {
489 489
 		global $wpdb;
490 490
 
491
-		foreach ( array_keys( wpinv_get_payment_gateways() ) as $gateway ) {
491
+		foreach (array_keys(wpinv_get_payment_gateways()) as $gateway) {
492 492
 
493 493
 			$wpdb->update(
494 494
 				$wpdb->prefix . 'getpaid_invoices',
495
-				array( 'gateway' => $gateway ),
496
-				array( 'gateway' => wpinv_get_gateway_admin_label( $gateway ) ),
495
+				array('gateway' => $gateway),
496
+				array('gateway' => wpinv_get_gateway_admin_label($gateway)),
497 497
 				'%s',
498 498
 				'%s'
499 499
 			);
Please login to merge, or discard this patch.
vendor/ayecode/wp-ayecode-ui/ayecode-ui-loader.php 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -7,40 +7,40 @@
 block discarded – undo
7 7
  * Bail if we are not in WP.
8 8
  */
9 9
 if ( ! defined( 'ABSPATH' ) ) {
10
-	exit;
10
+    exit;
11 11
 }
12 12
 
13 13
 /**
14 14
  * Set the version only if its the current newest while loading.
15 15
  */
16 16
 add_action('after_setup_theme', function () {
17
-	global $ayecode_ui_version,$ayecode_ui_file_key;
18
-	$this_version = "0.1.49";
19
-	if(version_compare($this_version , $ayecode_ui_version, '>')){
20
-		$ayecode_ui_version = $this_version ;
21
-		$ayecode_ui_file_key = wp_hash( __FILE__ );
22
-	}
17
+    global $ayecode_ui_version,$ayecode_ui_file_key;
18
+    $this_version = "0.1.49";
19
+    if(version_compare($this_version , $ayecode_ui_version, '>')){
20
+        $ayecode_ui_version = $this_version ;
21
+        $ayecode_ui_file_key = wp_hash( __FILE__ );
22
+    }
23 23
 },0);
24 24
 
25 25
 /**
26 26
  * Load this version of WP Bootstrap Settings only if the file hash is the current one.
27 27
  */
28 28
 add_action('after_setup_theme', function () {
29
-	global $ayecode_ui_file_key;
30
-	if($ayecode_ui_file_key && $ayecode_ui_file_key == wp_hash( __FILE__ )){
31
-		include_once( dirname( __FILE__ ) . '/includes/class-aui.php' );
32
-		include_once( dirname( __FILE__ ) . '/includes/ayecode-ui-settings.php' );
33
-	}
29
+    global $ayecode_ui_file_key;
30
+    if($ayecode_ui_file_key && $ayecode_ui_file_key == wp_hash( __FILE__ )){
31
+        include_once( dirname( __FILE__ ) . '/includes/class-aui.php' );
32
+        include_once( dirname( __FILE__ ) . '/includes/ayecode-ui-settings.php' );
33
+    }
34 34
 },1);
35 35
 
36 36
 /**
37 37
  * Add the function that calls the class.
38 38
  */
39 39
 if(!function_exists('aui')){
40
-	function aui(){
41
-		if(!class_exists("AUI",false)){
42
-			return false;
43
-		}
44
-		return AUI::instance();
45
-	}
40
+    function aui(){
41
+        if(!class_exists("AUI",false)){
42
+            return false;
43
+        }
44
+        return AUI::instance();
45
+    }
46 46
 }
47 47
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -6,39 +6,39 @@
 block discarded – undo
6 6
 /**
7 7
  * Bail if we are not in WP.
8 8
  */
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if (!defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
13 13
 /**
14 14
  * Set the version only if its the current newest while loading.
15 15
  */
16
-add_action('after_setup_theme', function () {
17
-	global $ayecode_ui_version,$ayecode_ui_file_key;
16
+add_action('after_setup_theme', function() {
17
+	global $ayecode_ui_version, $ayecode_ui_file_key;
18 18
 	$this_version = "0.1.49";
19
-	if(version_compare($this_version , $ayecode_ui_version, '>')){
20
-		$ayecode_ui_version = $this_version ;
21
-		$ayecode_ui_file_key = wp_hash( __FILE__ );
19
+	if (version_compare($this_version, $ayecode_ui_version, '>')) {
20
+		$ayecode_ui_version = $this_version;
21
+		$ayecode_ui_file_key = wp_hash(__FILE__);
22 22
 	}
23 23
 },0);
24 24
 
25 25
 /**
26 26
  * Load this version of WP Bootstrap Settings only if the file hash is the current one.
27 27
  */
28
-add_action('after_setup_theme', function () {
28
+add_action('after_setup_theme', function() {
29 29
 	global $ayecode_ui_file_key;
30
-	if($ayecode_ui_file_key && $ayecode_ui_file_key == wp_hash( __FILE__ )){
31
-		include_once( dirname( __FILE__ ) . '/includes/class-aui.php' );
32
-		include_once( dirname( __FILE__ ) . '/includes/ayecode-ui-settings.php' );
30
+	if ($ayecode_ui_file_key && $ayecode_ui_file_key == wp_hash(__FILE__)) {
31
+		include_once(dirname(__FILE__) . '/includes/class-aui.php');
32
+		include_once(dirname(__FILE__) . '/includes/ayecode-ui-settings.php');
33 33
 	}
34 34
 },1);
35 35
 
36 36
 /**
37 37
  * Add the function that calls the class.
38 38
  */
39
-if(!function_exists('aui')){
40
-	function aui(){
41
-		if(!class_exists("AUI",false)){
39
+if (!function_exists('aui')) {
40
+	function aui() {
41
+		if (!class_exists("AUI", false)) {
42 42
 			return false;
43 43
 		}
44 44
 		return AUI::instance();
Please login to merge, or discard this patch.
vendor/composer/InstalledVersions.php 2 patches
Indentation   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
 class InstalledVersions
13 13
 {
14 14
 private static $installed = array (
15
-  'root' => 
16
-  array (
15
+    'root' => 
16
+    array (
17 17
     'pretty_version' => 'dev-master',
18 18
     'version' => 'dev-master',
19 19
     'aliases' => 
@@ -21,87 +21,87 @@  discard block
 block discarded – undo
21 21
     ),
22 22
     'reference' => '7382ee9010a937feb1a5f52ade4e45a6b171565e',
23 23
     'name' => 'ayecode/invoicing',
24
-  ),
25
-  'versions' => 
26
-  array (
24
+    ),
25
+    'versions' => 
26
+    array (
27 27
     'ayecode/ayecode-connect-helper' => 
28 28
     array (
29
-      'pretty_version' => '1.0.3',
30
-      'version' => '1.0.3.0',
31
-      'aliases' => 
32
-      array (
33
-      ),
34
-      'reference' => '1af7cdefdbd20d4443a3ab4834e4c1cd8fe57fb4',
29
+        'pretty_version' => '1.0.3',
30
+        'version' => '1.0.3.0',
31
+        'aliases' => 
32
+        array (
33
+        ),
34
+        'reference' => '1af7cdefdbd20d4443a3ab4834e4c1cd8fe57fb4',
35 35
     ),
36 36
     'ayecode/invoicing' => 
37 37
     array (
38
-      'pretty_version' => 'dev-master',
39
-      'version' => 'dev-master',
40
-      'aliases' => 
41
-      array (
42
-      ),
43
-      'reference' => '7382ee9010a937feb1a5f52ade4e45a6b171565e',
38
+        'pretty_version' => 'dev-master',
39
+        'version' => 'dev-master',
40
+        'aliases' => 
41
+        array (
42
+        ),
43
+        'reference' => '7382ee9010a937feb1a5f52ade4e45a6b171565e',
44 44
     ),
45 45
     'ayecode/wp-ayecode-ui' => 
46 46
     array (
47
-      'pretty_version' => '0.1.49',
48
-      'version' => '0.1.49.0',
49
-      'aliases' => 
50
-      array (
51
-      ),
52
-      'reference' => '00082d05acd50d4ce103e054f483ca24f106f93c',
47
+        'pretty_version' => '0.1.49',
48
+        'version' => '0.1.49.0',
49
+        'aliases' => 
50
+        array (
51
+        ),
52
+        'reference' => '00082d05acd50d4ce103e054f483ca24f106f93c',
53 53
     ),
54 54
     'ayecode/wp-font-awesome-settings' => 
55 55
     array (
56
-      'pretty_version' => '1.0.12',
57
-      'version' => '1.0.12.0',
58
-      'aliases' => 
59
-      array (
60
-      ),
61
-      'reference' => '754cca6fda775f3e0b56b90a810dfcaea62ea288',
56
+        'pretty_version' => '1.0.12',
57
+        'version' => '1.0.12.0',
58
+        'aliases' => 
59
+        array (
60
+        ),
61
+        'reference' => '754cca6fda775f3e0b56b90a810dfcaea62ea288',
62 62
     ),
63 63
     'ayecode/wp-super-duper' => 
64 64
     array (
65
-      'pretty_version' => '1.0.26',
66
-      'version' => '1.0.26.0',
67
-      'aliases' => 
68
-      array (
69
-      ),
70
-      'reference' => '9f0c4fc4ff5fc3ffbe3346ae9964ae11b7032131',
65
+        'pretty_version' => '1.0.26',
66
+        'version' => '1.0.26.0',
67
+        'aliases' => 
68
+        array (
69
+        ),
70
+        'reference' => '9f0c4fc4ff5fc3ffbe3346ae9964ae11b7032131',
71 71
     ),
72 72
     'composer/installers' => 
73 73
     array (
74
-      'pretty_version' => 'v1.11.0',
75
-      'version' => '1.11.0.0',
76
-      'aliases' => 
77
-      array (
78
-      ),
79
-      'reference' => 'ae03311f45dfe194412081526be2e003960df74b',
74
+        'pretty_version' => 'v1.11.0',
75
+        'version' => '1.11.0.0',
76
+        'aliases' => 
77
+        array (
78
+        ),
79
+        'reference' => 'ae03311f45dfe194412081526be2e003960df74b',
80 80
     ),
81 81
     'maxmind-db/reader' => 
82 82
     array (
83
-      'pretty_version' => 'v1.6.0',
84
-      'version' => '1.6.0.0',
85
-      'aliases' => 
86
-      array (
87
-      ),
88
-      'reference' => 'febd4920bf17c1da84cef58e56a8227dfb37fbe4',
83
+        'pretty_version' => 'v1.6.0',
84
+        'version' => '1.6.0.0',
85
+        'aliases' => 
86
+        array (
87
+        ),
88
+        'reference' => 'febd4920bf17c1da84cef58e56a8227dfb37fbe4',
89 89
     ),
90 90
     'roundcube/plugin-installer' => 
91 91
     array (
92
-      'replaced' => 
93
-      array (
92
+        'replaced' => 
93
+        array (
94 94
         0 => '*',
95
-      ),
95
+        ),
96 96
     ),
97 97
     'shama/baton' => 
98 98
     array (
99
-      'replaced' => 
100
-      array (
99
+        'replaced' => 
100
+        array (
101 101
         0 => '*',
102
-      ),
102
+        ),
103
+    ),
103 104
     ),
104
-  ),
105 105
 );
106 106
 
107 107
 
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -11,93 +11,93 @@
 block discarded – undo
11 11
 
12 12
 class InstalledVersions
13 13
 {
14
-private static $installed = array (
14
+private static $installed = array(
15 15
   'root' => 
16
-  array (
16
+  array(
17 17
     'pretty_version' => 'dev-master',
18 18
     'version' => 'dev-master',
19 19
     'aliases' => 
20
-    array (
20
+    array(
21 21
     ),
22 22
     'reference' => '7382ee9010a937feb1a5f52ade4e45a6b171565e',
23 23
     'name' => 'ayecode/invoicing',
24 24
   ),
25 25
   'versions' => 
26
-  array (
26
+  array(
27 27
     'ayecode/ayecode-connect-helper' => 
28
-    array (
28
+    array(
29 29
       'pretty_version' => '1.0.3',
30 30
       'version' => '1.0.3.0',
31 31
       'aliases' => 
32
-      array (
32
+      array(
33 33
       ),
34 34
       'reference' => '1af7cdefdbd20d4443a3ab4834e4c1cd8fe57fb4',
35 35
     ),
36 36
     'ayecode/invoicing' => 
37
-    array (
37
+    array(
38 38
       'pretty_version' => 'dev-master',
39 39
       'version' => 'dev-master',
40 40
       'aliases' => 
41
-      array (
41
+      array(
42 42
       ),
43 43
       'reference' => '7382ee9010a937feb1a5f52ade4e45a6b171565e',
44 44
     ),
45 45
     'ayecode/wp-ayecode-ui' => 
46
-    array (
46
+    array(
47 47
       'pretty_version' => '0.1.49',
48 48
       'version' => '0.1.49.0',
49 49
       'aliases' => 
50
-      array (
50
+      array(
51 51
       ),
52 52
       'reference' => '00082d05acd50d4ce103e054f483ca24f106f93c',
53 53
     ),
54 54
     'ayecode/wp-font-awesome-settings' => 
55
-    array (
55
+    array(
56 56
       'pretty_version' => '1.0.12',
57 57
       'version' => '1.0.12.0',
58 58
       'aliases' => 
59
-      array (
59
+      array(
60 60
       ),
61 61
       'reference' => '754cca6fda775f3e0b56b90a810dfcaea62ea288',
62 62
     ),
63 63
     'ayecode/wp-super-duper' => 
64
-    array (
64
+    array(
65 65
       'pretty_version' => '1.0.26',
66 66
       'version' => '1.0.26.0',
67 67
       'aliases' => 
68
-      array (
68
+      array(
69 69
       ),
70 70
       'reference' => '9f0c4fc4ff5fc3ffbe3346ae9964ae11b7032131',
71 71
     ),
72 72
     'composer/installers' => 
73
-    array (
73
+    array(
74 74
       'pretty_version' => 'v1.11.0',
75 75
       'version' => '1.11.0.0',
76 76
       'aliases' => 
77
-      array (
77
+      array(
78 78
       ),
79 79
       'reference' => 'ae03311f45dfe194412081526be2e003960df74b',
80 80
     ),
81 81
     'maxmind-db/reader' => 
82
-    array (
82
+    array(
83 83
       'pretty_version' => 'v1.6.0',
84 84
       'version' => '1.6.0.0',
85 85
       'aliases' => 
86
-      array (
86
+      array(
87 87
       ),
88 88
       'reference' => 'febd4920bf17c1da84cef58e56a8227dfb37fbe4',
89 89
     ),
90 90
     'roundcube/plugin-installer' => 
91
-    array (
91
+    array(
92 92
       'replaced' => 
93
-      array (
93
+      array(
94 94
         0 => '*',
95 95
       ),
96 96
     ),
97 97
     'shama/baton' => 
98
-    array (
98
+    array(
99 99
       'replaced' => 
100
-      array (
100
+      array(
101 101
         0 => '*',
102 102
       ),
103 103
     ),
Please login to merge, or discard this patch.
vendor/composer/installed.php 2 patches
Indentation   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php return array (
2
-  'root' => 
3
-  array (
2
+    'root' => 
3
+    array (
4 4
     'pretty_version' => 'dev-master',
5 5
     'version' => 'dev-master',
6 6
     'aliases' => 
@@ -8,85 +8,85 @@  discard block
 block discarded – undo
8 8
     ),
9 9
     'reference' => '7382ee9010a937feb1a5f52ade4e45a6b171565e',
10 10
     'name' => 'ayecode/invoicing',
11
-  ),
12
-  'versions' => 
13
-  array (
11
+    ),
12
+    'versions' => 
13
+    array (
14 14
     'ayecode/ayecode-connect-helper' => 
15 15
     array (
16
-      'pretty_version' => '1.0.3',
17
-      'version' => '1.0.3.0',
18
-      'aliases' => 
19
-      array (
20
-      ),
21
-      'reference' => '1af7cdefdbd20d4443a3ab4834e4c1cd8fe57fb4',
16
+        'pretty_version' => '1.0.3',
17
+        'version' => '1.0.3.0',
18
+        'aliases' => 
19
+        array (
20
+        ),
21
+        'reference' => '1af7cdefdbd20d4443a3ab4834e4c1cd8fe57fb4',
22 22
     ),
23 23
     'ayecode/invoicing' => 
24 24
     array (
25
-      'pretty_version' => 'dev-master',
26
-      'version' => 'dev-master',
27
-      'aliases' => 
28
-      array (
29
-      ),
30
-      'reference' => '7382ee9010a937feb1a5f52ade4e45a6b171565e',
25
+        'pretty_version' => 'dev-master',
26
+        'version' => 'dev-master',
27
+        'aliases' => 
28
+        array (
29
+        ),
30
+        'reference' => '7382ee9010a937feb1a5f52ade4e45a6b171565e',
31 31
     ),
32 32
     'ayecode/wp-ayecode-ui' => 
33 33
     array (
34
-      'pretty_version' => '0.1.49',
35
-      'version' => '0.1.49.0',
36
-      'aliases' => 
37
-      array (
38
-      ),
39
-      'reference' => '00082d05acd50d4ce103e054f483ca24f106f93c',
34
+        'pretty_version' => '0.1.49',
35
+        'version' => '0.1.49.0',
36
+        'aliases' => 
37
+        array (
38
+        ),
39
+        'reference' => '00082d05acd50d4ce103e054f483ca24f106f93c',
40 40
     ),
41 41
     'ayecode/wp-font-awesome-settings' => 
42 42
     array (
43
-      'pretty_version' => '1.0.12',
44
-      'version' => '1.0.12.0',
45
-      'aliases' => 
46
-      array (
47
-      ),
48
-      'reference' => '754cca6fda775f3e0b56b90a810dfcaea62ea288',
43
+        'pretty_version' => '1.0.12',
44
+        'version' => '1.0.12.0',
45
+        'aliases' => 
46
+        array (
47
+        ),
48
+        'reference' => '754cca6fda775f3e0b56b90a810dfcaea62ea288',
49 49
     ),
50 50
     'ayecode/wp-super-duper' => 
51 51
     array (
52
-      'pretty_version' => '1.0.26',
53
-      'version' => '1.0.26.0',
54
-      'aliases' => 
55
-      array (
56
-      ),
57
-      'reference' => '9f0c4fc4ff5fc3ffbe3346ae9964ae11b7032131',
52
+        'pretty_version' => '1.0.26',
53
+        'version' => '1.0.26.0',
54
+        'aliases' => 
55
+        array (
56
+        ),
57
+        'reference' => '9f0c4fc4ff5fc3ffbe3346ae9964ae11b7032131',
58 58
     ),
59 59
     'composer/installers' => 
60 60
     array (
61
-      'pretty_version' => 'v1.11.0',
62
-      'version' => '1.11.0.0',
63
-      'aliases' => 
64
-      array (
65
-      ),
66
-      'reference' => 'ae03311f45dfe194412081526be2e003960df74b',
61
+        'pretty_version' => 'v1.11.0',
62
+        'version' => '1.11.0.0',
63
+        'aliases' => 
64
+        array (
65
+        ),
66
+        'reference' => 'ae03311f45dfe194412081526be2e003960df74b',
67 67
     ),
68 68
     'maxmind-db/reader' => 
69 69
     array (
70
-      'pretty_version' => 'v1.6.0',
71
-      'version' => '1.6.0.0',
72
-      'aliases' => 
73
-      array (
74
-      ),
75
-      'reference' => 'febd4920bf17c1da84cef58e56a8227dfb37fbe4',
70
+        'pretty_version' => 'v1.6.0',
71
+        'version' => '1.6.0.0',
72
+        'aliases' => 
73
+        array (
74
+        ),
75
+        'reference' => 'febd4920bf17c1da84cef58e56a8227dfb37fbe4',
76 76
     ),
77 77
     'roundcube/plugin-installer' => 
78 78
     array (
79
-      'replaced' => 
80
-      array (
79
+        'replaced' => 
80
+        array (
81 81
         0 => '*',
82
-      ),
82
+        ),
83 83
     ),
84 84
     'shama/baton' => 
85 85
     array (
86
-      'replaced' => 
87
-      array (
86
+        'replaced' => 
87
+        array (
88 88
         0 => '*',
89
-      ),
89
+        ),
90
+    ),
90 91
     ),
91
-  ),
92 92
 );
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -1,90 +1,90 @@
 block discarded – undo
1
-<?php return array (
1
+<?php return array(
2 2
   'root' => 
3
-  array (
3
+  array(
4 4
     'pretty_version' => 'dev-master',
5 5
     'version' => 'dev-master',
6 6
     'aliases' => 
7
-    array (
7
+    array(
8 8
     ),
9 9
     'reference' => '7382ee9010a937feb1a5f52ade4e45a6b171565e',
10 10
     'name' => 'ayecode/invoicing',
11 11
   ),
12 12
   'versions' => 
13
-  array (
13
+  array(
14 14
     'ayecode/ayecode-connect-helper' => 
15
-    array (
15
+    array(
16 16
       'pretty_version' => '1.0.3',
17 17
       'version' => '1.0.3.0',
18 18
       'aliases' => 
19
-      array (
19
+      array(
20 20
       ),
21 21
       'reference' => '1af7cdefdbd20d4443a3ab4834e4c1cd8fe57fb4',
22 22
     ),
23 23
     'ayecode/invoicing' => 
24
-    array (
24
+    array(
25 25
       'pretty_version' => 'dev-master',
26 26
       'version' => 'dev-master',
27 27
       'aliases' => 
28
-      array (
28
+      array(
29 29
       ),
30 30
       'reference' => '7382ee9010a937feb1a5f52ade4e45a6b171565e',
31 31
     ),
32 32
     'ayecode/wp-ayecode-ui' => 
33
-    array (
33
+    array(
34 34
       'pretty_version' => '0.1.49',
35 35
       'version' => '0.1.49.0',
36 36
       'aliases' => 
37
-      array (
37
+      array(
38 38
       ),
39 39
       'reference' => '00082d05acd50d4ce103e054f483ca24f106f93c',
40 40
     ),
41 41
     'ayecode/wp-font-awesome-settings' => 
42
-    array (
42
+    array(
43 43
       'pretty_version' => '1.0.12',
44 44
       'version' => '1.0.12.0',
45 45
       'aliases' => 
46
-      array (
46
+      array(
47 47
       ),
48 48
       'reference' => '754cca6fda775f3e0b56b90a810dfcaea62ea288',
49 49
     ),
50 50
     'ayecode/wp-super-duper' => 
51
-    array (
51
+    array(
52 52
       'pretty_version' => '1.0.26',
53 53
       'version' => '1.0.26.0',
54 54
       'aliases' => 
55
-      array (
55
+      array(
56 56
       ),
57 57
       'reference' => '9f0c4fc4ff5fc3ffbe3346ae9964ae11b7032131',
58 58
     ),
59 59
     'composer/installers' => 
60
-    array (
60
+    array(
61 61
       'pretty_version' => 'v1.11.0',
62 62
       'version' => '1.11.0.0',
63 63
       'aliases' => 
64
-      array (
64
+      array(
65 65
       ),
66 66
       'reference' => 'ae03311f45dfe194412081526be2e003960df74b',
67 67
     ),
68 68
     'maxmind-db/reader' => 
69
-    array (
69
+    array(
70 70
       'pretty_version' => 'v1.6.0',
71 71
       'version' => '1.6.0.0',
72 72
       'aliases' => 
73
-      array (
73
+      array(
74 74
       ),
75 75
       'reference' => 'febd4920bf17c1da84cef58e56a8227dfb37fbe4',
76 76
     ),
77 77
     'roundcube/plugin-installer' => 
78
-    array (
78
+    array(
79 79
       'replaced' => 
80
-      array (
80
+      array(
81 81
         0 => '*',
82 82
       ),
83 83
     ),
84 84
     'shama/baton' => 
85
-    array (
85
+    array(
86 86
       'replaced' => 
87
-      array (
87
+      array(
88 88
         0 => '*',
89 89
       ),
90 90
     ),
Please login to merge, or discard this patch.