@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | $this->_slug = 'venue-add-category-joyride'; |
35 | 35 | } |
36 | 36 | |
37 | - protected function _set_tour_stops() { |
|
37 | + protected function _set_tour_stops() { |
|
38 | 38 | $this->_stops = array( |
39 | 39 | 10 => array( |
40 | 40 | 'content' => $this->_stop_one(), |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | 'options' => array( |
55 | 55 | 'tipLocation' => 'right', |
56 | 56 | 'tipAdjustmentY' => -55, |
57 | - 'tipAdjustmentX' => 5 |
|
57 | + 'tipAdjustmentX' => 5 |
|
58 | 58 | ) |
59 | 59 | ), |
60 | 60 | 40 => array( |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | 'options' => array( |
64 | 64 | 'tipLocation' => 'top', |
65 | 65 | 'tipAdjustmentY' => -75, |
66 | - 'tipAdjustmentX' => 250 |
|
66 | + 'tipAdjustmentX' => 250 |
|
67 | 67 | ) |
68 | 68 | ) |
69 | 69 | ); |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | 4 | |
5 | 5 | /** |
@@ -71,21 +71,21 @@ discard block |
||
71 | 71 | |
72 | 72 | |
73 | 73 | protected function _stop_one() { |
74 | - $content = '<h3>' . __('Add New Venue Category', 'event_espresso') . '</h3>'; |
|
75 | - $content .= '<p>' . __('This tour of the Add New Venue Category page will provide an overview of the different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>'; |
|
74 | + $content = '<h3>'.__('Add New Venue Category', 'event_espresso').'</h3>'; |
|
75 | + $content .= '<p>'.__('This tour of the Add New Venue Category page will provide an overview of the different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>'; |
|
76 | 76 | return $content; |
77 | 77 | } |
78 | 78 | |
79 | 79 | protected function _category_name_stop() { |
80 | - return '<p>' . __('Enter a name for your new venue category.', 'event_espresso') . '</p>'; |
|
80 | + return '<p>'.__('Enter a name for your new venue category.', 'event_espresso').'</p>'; |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | protected function _category_id_stop() { |
84 | - return '<p>' . __('Enter a unique ID for your new venue category.', 'event_espresso') . '</p>'; |
|
84 | + return '<p>'.__('Enter a unique ID for your new venue category.', 'event_espresso').'</p>'; |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | protected function _category_editor_stop() { |
88 | - return '<p>' . __('The rich text editor can be used to add information about your venue category. Images and links can also be added along with your text.', 'event_espresso') . '</p>'; |
|
88 | + return '<p>'.__('The rich text editor can be used to add information about your venue category. Images and links can also be added along with your text.', 'event_espresso').'</p>'; |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | } |
92 | 92 | \ No newline at end of file |
@@ -1,6 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | +} |
|
4 | 5 | |
5 | 6 | /** |
6 | 7 | * Event Espresso |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | 4 | |
5 | 5 | /** |
@@ -109,8 +109,8 @@ discard block |
||
109 | 109 | |
110 | 110 | |
111 | 111 | protected function _stop_one() { |
112 | - $content = '<h3>' . __('Add Venue', 'event_espresso') . '</h3>'; |
|
113 | - $content .= '<p>' . __('This tour of the Venue Editor page will provide an overview of the different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>'; |
|
112 | + $content = '<h3>'.__('Add Venue', 'event_espresso').'</h3>'; |
|
113 | + $content .= '<p>'.__('This tour of the Venue Editor page will provide an overview of the different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>'; |
|
114 | 114 | return $content; |
115 | 115 | } |
116 | 116 | |
@@ -119,35 +119,35 @@ discard block |
||
119 | 119 | } |
120 | 120 | |
121 | 121 | protected function _venue_editor_stop() { |
122 | - return '<p>' . __('The rich text editor can be used to add information about your venue. Images and links can also be added along with your text.', 'event_espresso') . '</p>'; |
|
122 | + return '<p>'.__('The rich text editor can be used to add information about your venue. Images and links can also be added along with your text.', 'event_espresso').'</p>'; |
|
123 | 123 | } |
124 | 124 | |
125 | 125 | protected function _venue_tags_stop() { |
126 | - return '<p>' . __('Quickly add tags to your venue.', 'event_espresso') . '</p>'; |
|
126 | + return '<p>'.__('Quickly add tags to your venue.', 'event_espresso').'</p>'; |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | protected function _venue_categories_stop() { |
130 | - return '<p>' . __('Venues can also be categorized if you wish.', 'event_espresso') . '</p>'; |
|
130 | + return '<p>'.__('Venues can also be categorized if you wish.', 'event_espresso').'</p>'; |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | protected function _venue_physical_location_stop() { |
134 | - return '<p>' . __('Add a physical address for your venue.', 'event_espresso') . '</p>'; |
|
134 | + return '<p>'.__('Add a physical address for your venue.', 'event_espresso').'</p>'; |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | protected function _venue_gmap_stop() { |
138 | - return '<p>' . __('Enable or disable a Google Map for your venue.', 'event_espresso') . '</p>'; |
|
138 | + return '<p>'.__('Enable or disable a Google Map for your venue.', 'event_espresso').'</p>'; |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | protected function _venue_virtual_location_stop() { |
142 | - return '<p>' . __('Setup a virtual location for your venue.', 'event_espresso') . '</p>'; |
|
142 | + return '<p>'.__('Setup a virtual location for your venue.', 'event_espresso').'</p>'; |
|
143 | 143 | } |
144 | 144 | |
145 | 145 | protected function _stop_featured_image() { |
146 | - return '<p>' . __('Set a feature image for your venue here.', 'event_espresso') . '</p>'; |
|
146 | + return '<p>'.__('Set a feature image for your venue here.', 'event_espresso').'</p>'; |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | protected function _stop_publish_box() { |
150 | - return '<p>' . __('Easily control the status of your venue. The main options are Published, Pending Review, and Draft.', 'event_espresso') . '</p>'; |
|
150 | + return '<p>'.__('Easily control the status of your venue. The main options are Published, Pending Review, and Draft.', 'event_espresso').'</p>'; |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | } |
154 | 154 | \ No newline at end of file |
@@ -1,6 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | +} |
|
4 | 5 | |
5 | 6 | /** |
6 | 7 | * Event Espresso |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | 4 | |
5 | 5 | /** |
@@ -107,36 +107,36 @@ discard block |
||
107 | 107 | |
108 | 108 | |
109 | 109 | protected function _start() { |
110 | - $content = '<h3>' . __('Venue Overview', 'event_espresso') . '</h3>'; |
|
111 | - $content .= '<p>' . __('This tour of the Venues Overview page will provide an overview of the different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>'; |
|
110 | + $content = '<h3>'.__('Venue Overview', 'event_espresso').'</h3>'; |
|
111 | + $content .= '<p>'.__('This tour of the Venues Overview page will provide an overview of the different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>'; |
|
112 | 112 | return $content; |
113 | 113 | } |
114 | 114 | |
115 | 115 | protected function _id_stop() { |
116 | - return '<p>' . __('View the venue category ID. Can be sorted by ascending or descending order.', 'event_espresso') . '</p>'; |
|
116 | + return '<p>'.__('View the venue category ID. Can be sorted by ascending or descending order.', 'event_espresso').'</p>'; |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | protected function _name_stop() { |
120 | - return '<p>' . __('View the name of each venue category. Can be sorted by ascending or descending order.', 'event_espresso') . '</p>'; |
|
120 | + return '<p>'.__('View the name of each venue category. Can be sorted by ascending or descending order.', 'event_espresso').'</p>'; |
|
121 | 121 | } |
122 | 122 | |
123 | 123 | protected function _shortcode_stop() { |
124 | - return '<p>' . __('View the shortcode for a venue category. This shortcode can be added to an event, WordPress post, or WordPress page. ', 'event_espresso') . '</p>'; |
|
124 | + return '<p>'.__('View the shortcode for a venue category. This shortcode can be added to an event, WordPress post, or WordPress page. ', 'event_espresso').'</p>'; |
|
125 | 125 | } |
126 | 126 | |
127 | 127 | protected function _count_stop() { |
128 | - return '<p>' . __('View the number of venues that are associated with a category.', 'event_espresso') . '</p>'; |
|
128 | + return '<p>'.__('View the number of venues that are associated with a category.', 'event_espresso').'</p>'; |
|
129 | 129 | } |
130 | 130 | |
131 | 131 | protected function _bulk_actions_stop() { |
132 | - return '<p>' . __('Perform bulk actions to multiple venue categories.', 'event_espresso') . '</p>'; |
|
132 | + return '<p>'.__('Perform bulk actions to multiple venue categories.', 'event_espresso').'</p>'; |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | protected function _search_stop() { |
136 | - return '<p>' . __('Search through venues categories. The following sources will be searched: Venue Category ID, Venue Category Name, Venue Shortcode, and Venue Count.', 'event_espresso') . '</p>'; |
|
136 | + return '<p>'.__('Search through venues categories. The following sources will be searched: Venue Category ID, Venue Category Name, Venue Shortcode, and Venue Count.', 'event_espresso').'</p>'; |
|
137 | 137 | } |
138 | 138 | |
139 | 139 | protected function _new_category_stop() { |
140 | - return '<p>' . __('Click here to add a new venue category.', 'event_espresso') . '</p>'; |
|
140 | + return '<p>'.__('Click here to add a new venue category.', 'event_espresso').'</p>'; |
|
141 | 141 | } |
142 | 142 | } |
143 | 143 | \ No newline at end of file |
@@ -1,6 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | +} |
|
4 | 5 | |
5 | 6 | /** |
6 | 7 | * Event Espresso |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | 4 | |
5 | 5 | /** |
@@ -71,21 +71,21 @@ discard block |
||
71 | 71 | |
72 | 72 | |
73 | 73 | protected function _stop_one() { |
74 | - $content = '<h3>' . __('Edit Venue Category', 'event_espresso') . '</h3>'; |
|
75 | - $content .= '<p>' . __('This tour of the Edit Venue Category page will provide an overview of the different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>'; |
|
74 | + $content = '<h3>'.__('Edit Venue Category', 'event_espresso').'</h3>'; |
|
75 | + $content .= '<p>'.__('This tour of the Edit Venue Category page will provide an overview of the different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>'; |
|
76 | 76 | return $content; |
77 | 77 | } |
78 | 78 | |
79 | 79 | protected function _category_name_stop() { |
80 | - return '<p>' . __('Edit the name for your venue category.', 'event_espresso') . '</p>'; |
|
80 | + return '<p>'.__('Edit the name for your venue category.', 'event_espresso').'</p>'; |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | protected function _category_id_stop() { |
84 | - return '<p>' . __('View the unique ID for your category (cannot be changed).', 'event_espresso') . '</p>'; |
|
84 | + return '<p>'.__('View the unique ID for your category (cannot be changed).', 'event_espresso').'</p>'; |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | protected function _category_editor_stop() { |
88 | - return '<p>' . __('The rich text editor can be used to edit information about your venue category. Images and links can also be added or removed along with your text.', 'event_espresso') . '</p>'; |
|
88 | + return '<p>'.__('The rich text editor can be used to edit information about your venue category. Images and links can also be added or removed along with your text.', 'event_espresso').'</p>'; |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | } |
92 | 92 | \ No newline at end of file |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | 'options' => array( |
56 | 56 | 'tipLocation' => 'right', |
57 | 57 | 'tipAdjustmentY' => -55, |
58 | - 'tipAdjustmentX' => 5 |
|
58 | + 'tipAdjustmentX' => 5 |
|
59 | 59 | ) |
60 | 60 | ), |
61 | 61 | 40 => array( |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | 'options' => array( |
65 | 65 | 'tipLocation' => 'top', |
66 | 66 | 'tipAdjustmentY' => -75, |
67 | - 'tipAdjustmentX' => 250 |
|
67 | + 'tipAdjustmentX' => 250 |
|
68 | 68 | ) |
69 | 69 | ) |
70 | 70 | ); |
@@ -1,6 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | +} |
|
4 | 5 | |
5 | 6 | /** |
6 | 7 | * Event Espresso |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | 4 | |
5 | 5 | /** |
@@ -109,8 +109,8 @@ discard block |
||
109 | 109 | |
110 | 110 | |
111 | 111 | protected function _stop_one() { |
112 | - $content = '<h3>' . __('Edit Venue', 'event_espresso') . '</h3>'; |
|
113 | - $content .= '<p>' . __('This tour of the Venue Editor page will provide an overview of the different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>'; |
|
112 | + $content = '<h3>'.__('Edit Venue', 'event_espresso').'</h3>'; |
|
113 | + $content .= '<p>'.__('This tour of the Venue Editor page will provide an overview of the different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>'; |
|
114 | 114 | return $content; |
115 | 115 | } |
116 | 116 | |
@@ -119,35 +119,35 @@ discard block |
||
119 | 119 | } |
120 | 120 | |
121 | 121 | protected function _venue_editor_stop() { |
122 | - return '<p>' . __('The rich text editor can be used to edit information about your venue. Images and links can also be added or removed along with your text.', 'event_espresso') . '</p>'; |
|
122 | + return '<p>'.__('The rich text editor can be used to edit information about your venue. Images and links can also be added or removed along with your text.', 'event_espresso').'</p>'; |
|
123 | 123 | } |
124 | 124 | |
125 | 125 | protected function _venue_tags_stop() { |
126 | - return '<p>' . __('Quickly edit tags for your venue.', 'event_espresso') . '</p>'; |
|
126 | + return '<p>'.__('Quickly edit tags for your venue.', 'event_espresso').'</p>'; |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | protected function _venue_categories_stop() { |
130 | - return '<p>' . __('Venues can also be categorized if you wish.', 'event_espresso') . '</p>'; |
|
130 | + return '<p>'.__('Venues can also be categorized if you wish.', 'event_espresso').'</p>'; |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | protected function _venue_physical_location_stop() { |
134 | - return '<p>' . __('Edit the physical address for your venue.', 'event_espresso') . '</p>'; |
|
134 | + return '<p>'.__('Edit the physical address for your venue.', 'event_espresso').'</p>'; |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | protected function _venue_gmap_stop() { |
138 | - return '<p>' . __('Enable or disable a Google Map for your venue.', 'event_espresso') . '</p>'; |
|
138 | + return '<p>'.__('Enable or disable a Google Map for your venue.', 'event_espresso').'</p>'; |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | protected function _venue_virtual_location_stop() { |
142 | - return '<p>' . __('Setup a virtual location for your venue.', 'event_espresso') . '</p>'; |
|
142 | + return '<p>'.__('Setup a virtual location for your venue.', 'event_espresso').'</p>'; |
|
143 | 143 | } |
144 | 144 | |
145 | 145 | protected function _stop_featured_image() { |
146 | - return '<p>' . __('Set a feature image for your venue here.', 'event_espresso') . '</p>'; |
|
146 | + return '<p>'.__('Set a feature image for your venue here.', 'event_espresso').'</p>'; |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | protected function _stop_publish_box() { |
150 | - return '<p>' . __('Easily control the status of your venue. The main options are Published, Pending Review, and Draft.', 'event_espresso') . '</p>'; |
|
150 | + return '<p>'.__('Easily control the status of your venue. The main options are Published, Pending Review, and Draft.', 'event_espresso').'</p>'; |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | } |
154 | 154 | \ No newline at end of file |
@@ -1,6 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | +} |
|
4 | 5 | |
5 | 6 | /** |
6 | 7 | * Event Espresso |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | 4 | |
5 | 5 | /** |
@@ -125,44 +125,44 @@ discard block |
||
125 | 125 | |
126 | 126 | |
127 | 127 | protected function _start() { |
128 | - $content = '<h3>' . __('Venue Overview', 'event_espresso') . '</h3>'; |
|
129 | - $content .= '<p>' . __('This tour of the Venues Overview page will provide an overview of the different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>'; |
|
128 | + $content = '<h3>'.__('Venue Overview', 'event_espresso').'</h3>'; |
|
129 | + $content .= '<p>'.__('This tour of the Venues Overview page will provide an overview of the different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>'; |
|
130 | 130 | return $content; |
131 | 131 | } |
132 | 132 | |
133 | 133 | protected function _id_stop() { |
134 | - return '<p>' . __('View the venue ID. Can be sorted by ascending or descending order.', 'event_espresso') . '</p>'; |
|
134 | + return '<p>'.__('View the venue ID. Can be sorted by ascending or descending order.', 'event_espresso').'</p>'; |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | protected function _name_stop() { |
138 | - return '<p>' . __('View the name of each venue. Can be sorted by ascending or descending order.', 'event_espresso') . '</p>'; |
|
138 | + return '<p>'.__('View the name of each venue. Can be sorted by ascending or descending order.', 'event_espresso').'</p>'; |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | protected function _address_stop() { |
142 | - return '<p>' . __('View the address for each venue.', 'event_espresso') . '</p>'; |
|
142 | + return '<p>'.__('View the address for each venue.', 'event_espresso').'</p>'; |
|
143 | 143 | } |
144 | 144 | |
145 | 145 | protected function _city_stop() { |
146 | - return '<p>' . __('View the city for each venue. Can be sorted by ascending or descending order.', 'event_espresso') . '</p>'; |
|
146 | + return '<p>'.__('View the city for each venue. Can be sorted by ascending or descending order.', 'event_espresso').'</p>'; |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | protected function _capacity_stop() { |
150 | - return '<p>' . __('View the capacity for each venue. Can be sorted by ascending or descending order.', 'event_espresso') . '</p>'; |
|
150 | + return '<p>'.__('View the capacity for each venue. Can be sorted by ascending or descending order.', 'event_espresso').'</p>'; |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | protected function _shortcode_stop() { |
154 | - return '<p>' . __('View the shortcode for a venue. This shortcode can be added to an event, WordPress post, or WordPress page. ', 'event_espresso') . '</p>'; |
|
154 | + return '<p>'.__('View the shortcode for a venue. This shortcode can be added to an event, WordPress post, or WordPress page. ', 'event_espresso').'</p>'; |
|
155 | 155 | } |
156 | 156 | |
157 | 157 | protected function _bulk_actions_stop() { |
158 | - return '<p>' . __('Perform bulk actions to multiple venues.', 'event_espresso') . '</p>'; |
|
158 | + return '<p>'.__('Perform bulk actions to multiple venues.', 'event_espresso').'</p>'; |
|
159 | 159 | } |
160 | 160 | |
161 | 161 | protected function _search_stop() { |
162 | - return '<p>' . __('Search through venues. The following sources will be searched: Venue Name, Venue Description, Venue Short Description, Venue Address, Venue City, Venue Zip/Postal Code, Venue Phone, Venue URL, Venue Virtual Phone, Venue Google Map link, Event Name, Event Description, Event Phone, and Event External URL.', 'event_espresso') . '</p>'; |
|
162 | + return '<p>'.__('Search through venues. The following sources will be searched: Venue Name, Venue Description, Venue Short Description, Venue Address, Venue City, Venue Zip/Postal Code, Venue Phone, Venue URL, Venue Virtual Phone, Venue Google Map link, Event Name, Event Description, Event Phone, and Event External URL.', 'event_espresso').'</p>'; |
|
163 | 163 | } |
164 | 164 | |
165 | 165 | protected function _new_venue_stop() { |
166 | - return '<p>' . __('Click here to add a new venue.', 'event_espresso') . '</p>'; |
|
166 | + return '<p>'.__('Click here to add a new venue.', 'event_espresso').'</p>'; |
|
167 | 167 | } |
168 | 168 | } |
169 | 169 | \ No newline at end of file |
@@ -1,6 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | +} |
|
4 | 5 | |
5 | 6 | /** |
6 | 7 | * Event Espresso |
@@ -3,11 +3,11 @@ discard block |
||
3 | 3 | <td valign="top" class="use-ven-manager"> |
4 | 4 | <label><?php _e('Select from Venue Manager List', 'event_espresso'); ?></label> |
5 | 5 | <?php echo $venue_selector; ?> |
6 | - <?php foreach ( $venues as $venue ) : |
|
6 | + <?php foreach ($venues as $venue) : |
|
7 | 7 | $selected = $evt_venue_id == $venue->ID() ? '' : ' style="display:none;"'; |
8 | - $edit_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action' => 'edit', 'post' => $venue->ID() ), EE_VENUES_ADMIN_URL ); |
|
9 | - $state_name = is_object( $venue->state_obj() ) ? $venue->state_obj()->name() : NULL; |
|
10 | - $country_name = is_object( $venue->country_obj() ) ? $venue->country_obj()->name() : NULL; |
|
8 | + $edit_url = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'edit', 'post' => $venue->ID()), EE_VENUES_ADMIN_URL); |
|
9 | + $state_name = is_object($venue->state_obj()) ? $venue->state_obj()->name() : NULL; |
|
10 | + $country_name = is_object($venue->country_obj()) ? $venue->country_obj()->name() : NULL; |
|
11 | 11 | ?> |
12 | 12 | <fieldset id="eebox_<?php echo $venue->ID(); ?>" class="eebox"<?php echo $selected; ?>> |
13 | 13 | <ul class="address-view"> |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | <span><?php _e('State:', 'event_espresso'); ?></span> <?php echo $state_name; ?><br /> |
19 | 19 | <span><?php _e('Country:', 'event_espresso'); ?></span> <?php echo $country_name; ?><br /> |
20 | 20 | <span><?php _e('Venue ID:', 'event_espresso'); ?></span> <?php echo $venue->ID(); ?><br /></p> |
21 | - <!-- <?php printf( __('This venue\'s shortcode: %s[ESPRESSO_VENUE id="%d"]%s', 'event_espresso'), '<strong class="highlight">', $venue->ID(), '</strong>' ); ?><br /> --> |
|
21 | + <!-- <?php printf(__('This venue\'s shortcode: %s[ESPRESSO_VENUE id="%d"]%s', 'event_espresso'), '<strong class="highlight">', $venue->ID(), '</strong>'); ?><br /> --> |
|
22 | 22 | <a href="<?php echo $edit_url; ?>" target="_blank"><?php _e('Edit this Venue', 'event_espresso'); ?></a> |
23 | 23 | </li> |
24 | 24 | </ul> |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | <tr> |
3 | 3 | <td valign="top"> |
4 | 4 | <fieldset> |
5 | - <?php if( isset( EE_Registry::instance()->CFG->map_settings ) && isset( EE_Registry::instance()->CFG->map_settings->use_google_maps ) && EE_Registry::instance()->CFG->map_settings->use_google_maps ) { ?> |
|
5 | + <?php if (isset(EE_Registry::instance()->CFG->map_settings) && isset(EE_Registry::instance()->CFG->map_settings->use_google_maps) && EE_Registry::instance()->CFG->map_settings->use_google_maps) { ?> |
|
6 | 6 | <p> |
7 | 7 | <label for="enable_for_gmap"> |
8 | 8 | <?php _e('Display Google Map for this venue? ', 'event_espresso') ?> |
@@ -14,11 +14,11 @@ discard block |
||
14 | 14 | <input type="text" name="vnu_google_map_link" value="<?php echo $vnu_google_map_link; ?>" class="all-options" /> |
15 | 15 | </p> --> |
16 | 16 | <?php } ?> |
17 | - <?php if( ! isset( EE_Registry::instance()->CFG->map_settings ) || ! isset( EE_Registry::instance()->CFG->map_settings->use_google_maps ) || ! EE_Registry::instance()->CFG->map_settings->use_google_maps ) { ?> |
|
17 | + <?php if ( ! isset(EE_Registry::instance()->CFG->map_settings) || ! isset(EE_Registry::instance()->CFG->map_settings->use_google_maps) || ! EE_Registry::instance()->CFG->map_settings->use_google_maps) { ?> |
|
18 | 18 | <p class="ee-notice"> |
19 | 19 | <?php |
20 | 20 | echo sprintf( |
21 | - __('To display a Google Map for event venues, go to %sEvent Espresso General Settings%sGoogle Maps%s, and set "Activate Google Maps" to "Yes"', 'event_espresso' ), |
|
21 | + __('To display a Google Map for event venues, go to %sEvent Espresso General Settings%sGoogle Maps%s, and set "Activate Google Maps" to "Yes"', 'event_espresso'), |
|
22 | 22 | '<b>', |
23 | 23 | '</b> » <b>', |
24 | 24 | '</b>' |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | 'quantity'=>$line_item->quantity() |
49 | 49 | ); |
50 | 50 | } |
51 | - }else{//its a partial payment |
|
51 | + } else{//its a partial payment |
|
52 | 52 | $tax_total = 0; |
53 | 53 | //partial payment, so just add 1 item |
54 | 54 | $items[] = array( |
@@ -113,19 +113,19 @@ discard block |
||
113 | 113 | foreach($response_body_as_array as $problem_parameter => $problems){ |
114 | 114 | $problems_string.= sprintf(__('\nProblems with %s: %s','event_espresso'),$problem_parameter,implode(", ",$problems)); |
115 | 115 | } |
116 | - }else{ |
|
116 | + } else{ |
|
117 | 117 | $problems_string = $response['body']; |
118 | 118 | } |
119 | 119 | if( ! $problems_string ) { |
120 | 120 | //no message to show? wack |
121 | 121 | if( isset( $response[ 'headers' ][ 'status' ] ) ){ |
122 | 122 | $problems_string = $response[ 'headers' ][ 'status' ]; |
123 | - }else{ |
|
123 | + } else{ |
|
124 | 124 | $problems_string = __( 'No response from Mijireh', 'event_espresso' ); |
125 | 125 | } |
126 | 126 | } |
127 | 127 | } |
128 | - }else{ |
|
128 | + } else{ |
|
129 | 129 | $problems_string = implode( ",", $response->get_error_messages() ); |
130 | 130 | } |
131 | 131 | |
@@ -156,9 +156,9 @@ discard block |
||
156 | 156 | $prepared_data[ $key ] = $this->_prepare_for_mijireh( $datum ); |
157 | 157 | } |
158 | 158 | return $prepared_data; |
159 | - }elseif(is_string( $data ) ){ |
|
159 | + } elseif(is_string( $data ) ){ |
|
160 | 160 | return str_replace( '%', 'percent', $data ); |
161 | - }else{ |
|
161 | + } else{ |
|
162 | 162 | return $data; |
163 | 163 | } |
164 | 164 | } |
@@ -111,45 +111,45 @@ |
||
111 | 111 | 'body'=> wp_json_encode($order) |
112 | 112 | ); |
113 | 113 | $response = wp_remote_post( $this->_mijireh_api_orders_url, $args ); |
114 | - $problems_string = false; |
|
114 | + $problems_string = false; |
|
115 | 115 | $this->log(array('get checkout url request_args' => $args, 'response' => $response ), $payment); |
116 | 116 | if( ! $response instanceof WP_Error ){ |
117 | 117 | $response_body = json_decode($response['body']); |
118 | 118 | if($response_body && isset($response_body->checkout_url)){ |
119 | - $payment->set_redirect_url($response_body->checkout_url); |
|
120 | - $payment->set_txn_id_chq_nmbr($response_body->order_number); |
|
121 | - $payment->set_details($response['body']); |
|
119 | + $payment->set_redirect_url($response_body->checkout_url); |
|
120 | + $payment->set_txn_id_chq_nmbr($response_body->order_number); |
|
121 | + $payment->set_details($response['body']); |
|
122 | 122 | } else { |
123 | - if( is_array( $response_body ) || is_object( $response_body)){ |
|
124 | - $response_body_as_array = (array)$response_body; |
|
125 | - foreach($response_body_as_array as $problem_parameter => $problems){ |
|
126 | - $problems_string.= sprintf(__('\nProblems with %s: %s','event_espresso'),$problem_parameter,implode(", ",$problems)); |
|
127 | - } |
|
128 | - }else{ |
|
129 | - $problems_string = $response['body']; |
|
130 | - } |
|
131 | - if( ! $problems_string ) { |
|
132 | - //no message to show? wack |
|
133 | - if( isset( $response[ 'headers' ][ 'status' ] ) ){ |
|
134 | - $problems_string = $response[ 'headers' ][ 'status' ]; |
|
135 | - }else{ |
|
136 | - $problems_string = __( 'No response from Mijireh', 'event_espresso' ); |
|
137 | - } |
|
138 | - } |
|
139 | - } |
|
123 | + if( is_array( $response_body ) || is_object( $response_body)){ |
|
124 | + $response_body_as_array = (array)$response_body; |
|
125 | + foreach($response_body_as_array as $problem_parameter => $problems){ |
|
126 | + $problems_string.= sprintf(__('\nProblems with %s: %s','event_espresso'),$problem_parameter,implode(", ",$problems)); |
|
127 | + } |
|
128 | + }else{ |
|
129 | + $problems_string = $response['body']; |
|
130 | + } |
|
131 | + if( ! $problems_string ) { |
|
132 | + //no message to show? wack |
|
133 | + if( isset( $response[ 'headers' ][ 'status' ] ) ){ |
|
134 | + $problems_string = $response[ 'headers' ][ 'status' ]; |
|
135 | + }else{ |
|
136 | + $problems_string = __( 'No response from Mijireh', 'event_espresso' ); |
|
137 | + } |
|
138 | + } |
|
139 | + } |
|
140 | 140 | }else{ |
141 | - $problems_string = implode( ",", $response->get_error_messages() ); |
|
141 | + $problems_string = implode( ",", $response->get_error_messages() ); |
|
142 | 142 | } |
143 | 143 | |
144 | - if( $problems_string ) { |
|
145 | - $payment->set_gateway_response( sprintf( __( 'Errors occurred communicating with Mijireh: %1$s', 'event_espresso'), $problems_string ) ); |
|
146 | - $payment->set_details( $response ); |
|
147 | - $payment->set_redirect_url( null ); |
|
148 | - //even though the payment's status is failed at this point anyways, |
|
149 | - //let's be explicit about it. The fact that the redirect url is null |
|
150 | - //should be enough to client code that they can't redirect the user |
|
151 | - $payment->set_status( $this->_pay_model->failed_status() ); |
|
152 | - } |
|
144 | + if( $problems_string ) { |
|
145 | + $payment->set_gateway_response( sprintf( __( 'Errors occurred communicating with Mijireh: %1$s', 'event_espresso'), $problems_string ) ); |
|
146 | + $payment->set_details( $response ); |
|
147 | + $payment->set_redirect_url( null ); |
|
148 | + //even though the payment's status is failed at this point anyways, |
|
149 | + //let's be explicit about it. The fact that the redirect url is null |
|
150 | + //should be enough to client code that they can't redirect the user |
|
151 | + $payment->set_status( $this->_pay_model->failed_status() ); |
|
152 | + } |
|
153 | 153 | return $payment; |
154 | 154 | } |
155 | 155 |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | * @author Mike Nelson |
9 | 9 | * |
10 | 10 | */ |
11 | -class EEG_Mijireh extends EE_Offsite_Gateway{ |
|
11 | +class EEG_Mijireh extends EE_Offsite_Gateway { |
|
12 | 12 | |
13 | 13 | protected $_access_key; |
14 | 14 | |
@@ -37,14 +37,14 @@ discard block |
||
37 | 37 | $primary_attendee = $primary_registrant->attendee(); |
38 | 38 | $items = array(); |
39 | 39 | //if we're are charging for the full amount, show the normal line items |
40 | - if( $this->_can_easily_itemize_transaction_for( $payment )){ |
|
40 | + if ($this->_can_easily_itemize_transaction_for($payment)) { |
|
41 | 41 | $total_line_item = $transaction->total_line_item(); |
42 | 42 | $tax_total = $total_line_item->get_total_tax(); |
43 | - foreach($total_line_item->get_items() as $line_item){ |
|
43 | + foreach ($total_line_item->get_items() as $line_item) { |
|
44 | 44 | $items[] = array( |
45 | 45 | 'name'=>apply_filters( |
46 | 46 | 'FHEE__EEG_Mijireh__set_redirection_info__full_amount_line_item_name', |
47 | - $this->_format_line_item_name( $line_item, $payment ), |
|
47 | + $this->_format_line_item_name($line_item, $payment), |
|
48 | 48 | $line_item, |
49 | 49 | $payment, |
50 | 50 | $primary_registrant |
@@ -54,13 +54,13 @@ discard block |
||
54 | 54 | 'quantity'=>$line_item->quantity() |
55 | 55 | ); |
56 | 56 | } |
57 | - }else{//its a partial payment |
|
57 | + } else {//its a partial payment |
|
58 | 58 | $tax_total = 0; |
59 | 59 | //partial payment, so just add 1 item |
60 | 60 | $items[] = array( |
61 | 61 | 'name'=> apply_filters( |
62 | 62 | 'FHEE__EEG_Mijireh__set_redirection_info__partial_amount_line_item_name', |
63 | - $this->_format_partial_payment_line_item_name( $payment ), |
|
63 | + $this->_format_partial_payment_line_item_name($payment), |
|
64 | 64 | $payment, |
65 | 65 | $primary_registrant |
66 | 66 | ), |
@@ -72,18 +72,18 @@ discard block |
||
72 | 72 | $order = array( |
73 | 73 | 'total'=>$this->format_currency($payment->amount()), |
74 | 74 | 'return_url'=>$return_url, |
75 | - 'items'=>$this->_prepare_for_mijireh( $items ), |
|
75 | + 'items'=>$this->_prepare_for_mijireh($items), |
|
76 | 76 | 'email'=>$primary_attendee->email(), |
77 | 77 | 'first_name'=>$primary_attendee->fname(), |
78 | 78 | 'last_name'=>$primary_attendee->lname(), |
79 | 79 | 'tax'=>$this->format_currency($tax_total), |
80 | 80 | 'partner_id'=>'ee'); |
81 | 81 | //setup address? |
82 | - if( $primary_attendee->address() && |
|
83 | - $primary_attendee->city() && |
|
84 | - $primary_attendee->state_ID() && |
|
85 | - $primary_attendee->country_ID() && |
|
86 | - $primary_attendee->zip() ){ |
|
82 | + if ($primary_attendee->address() && |
|
83 | + $primary_attendee->city() && |
|
84 | + $primary_attendee->state_ID() && |
|
85 | + $primary_attendee->country_ID() && |
|
86 | + $primary_attendee->zip()) { |
|
87 | 87 | $shipping_address = array( |
88 | 88 | 'first_name'=>$primary_attendee->fname(), |
89 | 89 | 'last_name'=>$primary_attendee->lname(), |
@@ -93,62 +93,62 @@ discard block |
||
93 | 93 | 'zip_code' => $primary_attendee->zip(), |
94 | 94 | 'country' => $primary_attendee->country_ID() |
95 | 95 | ); |
96 | - if( $primary_attendee->address2() ){ |
|
97 | - $shipping_address[ 'apt_suite' ] = $primary_attendee->address2(); |
|
96 | + if ($primary_attendee->address2()) { |
|
97 | + $shipping_address['apt_suite'] = $primary_attendee->address2(); |
|
98 | 98 | } |
99 | - if( $primary_attendee->phone() ){ |
|
100 | - $shipping_address[ 'phone' ] = $primary_attendee->phone(); |
|
99 | + if ($primary_attendee->phone()) { |
|
100 | + $shipping_address['phone'] = $primary_attendee->phone(); |
|
101 | 101 | } |
102 | - $order[ 'shipping_address' ] = $shipping_address; |
|
102 | + $order['shipping_address'] = $shipping_address; |
|
103 | 103 | } |
104 | - $order = apply_filters( 'FHEE__EEG_Mijireh__set_redirection_info__order_arguments', $order, $payment, $primary_registrant ); |
|
105 | - do_action( 'AHEE_log', __FILE__, __FUNCTION__, serialize(get_object_vars($this)) ); |
|
104 | + $order = apply_filters('FHEE__EEG_Mijireh__set_redirection_info__order_arguments', $order, $payment, $primary_registrant); |
|
105 | + do_action('AHEE_log', __FILE__, __FUNCTION__, serialize(get_object_vars($this))); |
|
106 | 106 | $args = array( |
107 | 107 | 'headers' => array( |
108 | - 'Authorization' => 'Basic ' . base64_encode( $this->_access_key . ':' ), |
|
108 | + 'Authorization' => 'Basic '.base64_encode($this->_access_key.':'), |
|
109 | 109 | 'Accept'=>'application/json' |
110 | 110 | ), |
111 | 111 | 'body'=> wp_json_encode($order) |
112 | 112 | ); |
113 | - $response = wp_remote_post( $this->_mijireh_api_orders_url, $args ); |
|
113 | + $response = wp_remote_post($this->_mijireh_api_orders_url, $args); |
|
114 | 114 | $problems_string = false; |
115 | - $this->log(array('get checkout url request_args' => $args, 'response' => $response ), $payment); |
|
116 | - if( ! $response instanceof WP_Error ){ |
|
115 | + $this->log(array('get checkout url request_args' => $args, 'response' => $response), $payment); |
|
116 | + if ( ! $response instanceof WP_Error) { |
|
117 | 117 | $response_body = json_decode($response['body']); |
118 | - if($response_body && isset($response_body->checkout_url)){ |
|
118 | + if ($response_body && isset($response_body->checkout_url)) { |
|
119 | 119 | $payment->set_redirect_url($response_body->checkout_url); |
120 | 120 | $payment->set_txn_id_chq_nmbr($response_body->order_number); |
121 | 121 | $payment->set_details($response['body']); |
122 | 122 | } else { |
123 | - if( is_array( $response_body ) || is_object( $response_body)){ |
|
124 | - $response_body_as_array = (array)$response_body; |
|
125 | - foreach($response_body_as_array as $problem_parameter => $problems){ |
|
126 | - $problems_string.= sprintf(__('\nProblems with %s: %s','event_espresso'),$problem_parameter,implode(", ",$problems)); |
|
123 | + if (is_array($response_body) || is_object($response_body)) { |
|
124 | + $response_body_as_array = (array) $response_body; |
|
125 | + foreach ($response_body_as_array as $problem_parameter => $problems) { |
|
126 | + $problems_string .= sprintf(__('\nProblems with %s: %s', 'event_espresso'), $problem_parameter, implode(", ", $problems)); |
|
127 | 127 | } |
128 | - }else{ |
|
128 | + } else { |
|
129 | 129 | $problems_string = $response['body']; |
130 | 130 | } |
131 | - if( ! $problems_string ) { |
|
131 | + if ( ! $problems_string) { |
|
132 | 132 | //no message to show? wack |
133 | - if( isset( $response[ 'headers' ][ 'status' ] ) ){ |
|
134 | - $problems_string = $response[ 'headers' ][ 'status' ]; |
|
135 | - }else{ |
|
136 | - $problems_string = __( 'No response from Mijireh', 'event_espresso' ); |
|
133 | + if (isset($response['headers']['status'])) { |
|
134 | + $problems_string = $response['headers']['status']; |
|
135 | + } else { |
|
136 | + $problems_string = __('No response from Mijireh', 'event_espresso'); |
|
137 | 137 | } |
138 | 138 | } |
139 | 139 | } |
140 | - }else{ |
|
141 | - $problems_string = implode( ",", $response->get_error_messages() ); |
|
140 | + } else { |
|
141 | + $problems_string = implode(",", $response->get_error_messages()); |
|
142 | 142 | } |
143 | 143 | |
144 | - if( $problems_string ) { |
|
145 | - $payment->set_gateway_response( sprintf( __( 'Errors occurred communicating with Mijireh: %1$s', 'event_espresso'), $problems_string ) ); |
|
146 | - $payment->set_details( $response ); |
|
147 | - $payment->set_redirect_url( null ); |
|
144 | + if ($problems_string) { |
|
145 | + $payment->set_gateway_response(sprintf(__('Errors occurred communicating with Mijireh: %1$s', 'event_espresso'), $problems_string)); |
|
146 | + $payment->set_details($response); |
|
147 | + $payment->set_redirect_url(null); |
|
148 | 148 | //even though the payment's status is failed at this point anyways, |
149 | 149 | //let's be explicit about it. The fact that the redirect url is null |
150 | 150 | //should be enough to client code that they can't redirect the user |
151 | - $payment->set_status( $this->_pay_model->failed_status() ); |
|
151 | + $payment->set_status($this->_pay_model->failed_status()); |
|
152 | 152 | } |
153 | 153 | return $payment; |
154 | 154 | } |
@@ -161,16 +161,16 @@ discard block |
||
161 | 161 | * @param mixed $data |
162 | 162 | * @return mixed same type as $data |
163 | 163 | */ |
164 | - private function _prepare_for_mijireh( $data ){ |
|
165 | - if( is_array( $data ) ){ |
|
164 | + private function _prepare_for_mijireh($data) { |
|
165 | + if (is_array($data)) { |
|
166 | 166 | $prepared_data = array(); |
167 | - foreach($data as $key => $datum ){ |
|
168 | - $prepared_data[ $key ] = $this->_prepare_for_mijireh( $datum ); |
|
167 | + foreach ($data as $key => $datum) { |
|
168 | + $prepared_data[$key] = $this->_prepare_for_mijireh($datum); |
|
169 | 169 | } |
170 | 170 | return $prepared_data; |
171 | - }elseif(is_string( $data ) ){ |
|
172 | - return str_replace( '%', 'percent', $data ); |
|
173 | - }else{ |
|
171 | + }elseif (is_string($data)) { |
|
172 | + return str_replace('%', 'percent', $data); |
|
173 | + } else { |
|
174 | 174 | return $data; |
175 | 175 | } |
176 | 176 | } |
@@ -191,30 +191,30 @@ discard block |
||
191 | 191 | |
192 | 192 | $payment = $transaction instanceof EEI_Transaction ? $transaction->last_payment() : NULL; |
193 | 193 | |
194 | - if ( ! $payment instanceof EEI_Payment ){ |
|
195 | - throw new EE_Error( sprintf( __( "Could not find Mijireh payment for transaction %s", 'event_espresso' ), $transaction->ID() ) ); |
|
194 | + if ( ! $payment instanceof EEI_Payment) { |
|
195 | + throw new EE_Error(sprintf(__("Could not find Mijireh payment for transaction %s", 'event_espresso'), $transaction->ID())); |
|
196 | 196 | } |
197 | 197 | |
198 | 198 | $request_args = array( |
199 | 199 | 'headers' => array( |
200 | - 'Authorization' => 'Basic ' . base64_encode( $this->_access_key . ':' ), |
|
200 | + 'Authorization' => 'Basic '.base64_encode($this->_access_key.':'), |
|
201 | 201 | 'Accept'=>'application/json' |
202 | 202 | ) |
203 | 203 | ); |
204 | 204 | |
205 | 205 | $response = wp_remote_get( |
206 | - $this->_mijireh_api_orders_url . '/' . $payment->txn_id_chq_nmbr(), |
|
206 | + $this->_mijireh_api_orders_url.'/'.$payment->txn_id_chq_nmbr(), |
|
207 | 207 | $request_args |
208 | 208 | ); |
209 | 209 | |
210 | 210 | $this->log( |
211 | - array( 'get payment status request_args' => $request_args, 'response' => $response ), |
|
211 | + array('get payment status request_args' => $request_args, 'response' => $response), |
|
212 | 212 | $payment |
213 | 213 | ); |
214 | 214 | // validate response |
215 | - $response_body = isset( $response[ 'body' ] ) ? json_decode( $response[ 'body' ] ) : ''; |
|
216 | - if( $response && $response_body ){ |
|
217 | - switch( $response_body->status ){ |
|
215 | + $response_body = isset($response['body']) ? json_decode($response['body']) : ''; |
|
216 | + if ($response && $response_body) { |
|
217 | + switch ($response_body->status) { |
|
218 | 218 | case 'paid': |
219 | 219 | $payment->set_status($this->_pay_model->approved_status()); |
220 | 220 | break; |
@@ -226,9 +226,9 @@ discard block |
||
226 | 226 | } |
227 | 227 | |
228 | 228 | } else { |
229 | - $payment->set_gateway_response( __( 'Response from Mijireh could not be understood.', 'event_espresso' ) ); |
|
230 | - $payment->set_details( $response ); |
|
231 | - $payment->set_status( $this->_pay_model->failed_status() ); |
|
229 | + $payment->set_gateway_response(__('Response from Mijireh could not be understood.', 'event_espresso')); |
|
230 | + $payment->set_details($response); |
|
231 | + $payment->set_status($this->_pay_model->failed_status()); |
|
232 | 232 | } |
233 | 233 | // the following is ONLY for testing the Mijireh IPN and should NEVER be uncommented for real usage |
234 | 234 | // $payment->set_status( $this->_pay_model->pending_status() ); |