Changeset 1921268
- Timestamp:
- 08/07/2018 09:11:22 PM (8 years ago)
- Location:
- woocommerce-local-pickup-time-select/trunk
- Files:
-
- 3 added
- 7 edited
-
Gruntfile.js (added)
-
admin/class-local-pickup-time-admin.php (modified) (20 diffs)
-
languages/woocommerce-local-pickup-time-en_US.mo (modified) (previous)
-
languages/woocommerce-local-pickup-time-en_US.po (modified) (3 diffs)
-
languages/woocommerce-local-pickup-time.pot (modified) (3 diffs)
-
package-lock.json (added)
-
package.json (added)
-
public/class-local-pickup-time.php (modified) (15 diffs)
-
readme.txt (modified) (2 diffs)
-
woocommerce-local-pickup-time.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-local-pickup-time-select/trunk/admin/class-local-pickup-time-admin.php
r1678802 r1921268 90 90 $updated_settings[] = array( 91 91 array( 92 'title' => __( 'Store Hours and Closings for Local Pickup', $this->plugin_slug ),92 'title' => __( 'Store Hours and Closings for Local Pickup', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 93 93 'type' => 'title', 94 'desc' => __('The following options affect when order pickups begin and end each day, and which days to not allow order pickups.', $this->plugin_slug ),94 'desc' => __('The following options affect when order pickups begin and end each day, and which days to not allow order pickups.', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 95 95 'id' => 'local_pickup_hours' 96 96 ), 97 97 array( 98 'title' => __( 'Monday Pickup Start Time (use 24-hour time)', $this->plugin_slug ),99 'desc' => __( 'This sets the pickup start time for Monday. Use 24-hour time format.', $this->plugin_slug ),98 'title' => __( 'Monday Pickup Start Time (use 24-hour time)', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 99 'desc' => __( 'This sets the pickup start time for Monday. Use 24-hour time format.', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 100 100 'id' => 'local_pickup_hours_monday_start', 101 101 'css' => 'width:100px;', … … 105 105 ), 106 106 array( 107 'title' => __( 'Monday Pickup End Time (use 24-hour time)', $this->plugin_slug ),108 'desc' => __( 'This sets the pickup end time for Monday. Use 24-hour time format.', $this->plugin_slug ),107 'title' => __( 'Monday Pickup End Time (use 24-hour time)', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 108 'desc' => __( 'This sets the pickup end time for Monday. Use 24-hour time format.', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 109 109 'id' => 'local_pickup_hours_monday_end', 110 110 'css' => 'width:100px;', … … 114 114 ), 115 115 array( 116 'title' => __( 'Tuesday Pickup Start Time (use 24-hour time)', $this->plugin_slug ),117 'desc' => __( 'This sets the pickup start time for Tuesday. Use 24-hour time format.', $this->plugin_slug ),116 'title' => __( 'Tuesday Pickup Start Time (use 24-hour time)', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 117 'desc' => __( 'This sets the pickup start time for Tuesday. Use 24-hour time format.', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 118 118 'id' => 'local_pickup_hours_tuesday_start', 119 119 'css' => 'width:100px;', … … 123 123 ), 124 124 array( 125 'title' => __( 'Tuesday Pickup End Time (use 24-hour time)', $this->plugin_slug ),126 'desc' => __( 'This sets the pickup end time for Tuesday. Use 24-hour time format.', $this->plugin_slug ),125 'title' => __( 'Tuesday Pickup End Time (use 24-hour time)', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 126 'desc' => __( 'This sets the pickup end time for Tuesday. Use 24-hour time format.', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 127 127 'id' => 'local_pickup_hours_tuesday_end', 128 128 'css' => 'width:100px;', … … 132 132 ), 133 133 array( 134 'title' => __( 'Wednesday Pickup Start Time (use 24-hour time)', $this->plugin_slug ),135 'desc' => __( 'This sets the pickup start time for Wednesday. Use 24-hour time format.', $this->plugin_slug ),134 'title' => __( 'Wednesday Pickup Start Time (use 24-hour time)', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 135 'desc' => __( 'This sets the pickup start time for Wednesday. Use 24-hour time format.', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 136 136 'id' => 'local_pickup_hours_wednesday_start', 137 137 'css' => 'width:100px;', … … 141 141 ), 142 142 array( 143 'title' => __( 'Wednesday Pickup End Time (use 24-hour time)', $this->plugin_slug ),144 'desc' => __( 'This sets the pickup end time for Wednesday. Use 24-hour time format.', $this->plugin_slug ),143 'title' => __( 'Wednesday Pickup End Time (use 24-hour time)', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 144 'desc' => __( 'This sets the pickup end time for Wednesday. Use 24-hour time format.', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 145 145 'id' => 'local_pickup_hours_wednesday_end', 146 146 'css' => 'width:100px;', … … 150 150 ), 151 151 array( 152 'title' => __( 'Thursday Pickup Start Time (use 24-hour time)', $this->plugin_slug ),153 'desc' => __( 'This sets the pickup start time for Thursday. Use 24-hour time format.', $this->plugin_slug ),152 'title' => __( 'Thursday Pickup Start Time (use 24-hour time)', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 153 'desc' => __( 'This sets the pickup start time for Thursday. Use 24-hour time format.', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 154 154 'id' => 'local_pickup_hours_thursday_start', 155 155 'css' => 'width:100px;', … … 159 159 ), 160 160 array( 161 'title' => __( 'Thursday Pickup End Time (use 24-hour time)', $this->plugin_slug ),162 'desc' => __( 'This sets the pickup end time for Thursday. Use 24-hour time format.', $this->plugin_slug ),161 'title' => __( 'Thursday Pickup End Time (use 24-hour time)', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 162 'desc' => __( 'This sets the pickup end time for Thursday. Use 24-hour time format.', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 163 163 'id' => 'local_pickup_hours_thursday_end', 164 164 'css' => 'width:100px;', … … 168 168 ), 169 169 array( 170 'title' => __( 'Friday Pickup Start Time (use 24-hour time)', $this->plugin_slug ),171 'desc' => __( 'This sets the pickup start time for Friday. Use 24-hour time format.', $this->plugin_slug ),170 'title' => __( 'Friday Pickup Start Time (use 24-hour time)', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 171 'desc' => __( 'This sets the pickup start time for Friday. Use 24-hour time format.', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 172 172 'id' => 'local_pickup_hours_friday_start', 173 173 'css' => 'width:100px;', … … 177 177 ), 178 178 array( 179 'title' => __( 'Friday Pickup End Time (use 24-hour time)', $this->plugin_slug ),180 'desc' => __( 'This sets the pickup end time for Friday. Use 24-hour time format.', $this->plugin_slug ),179 'title' => __( 'Friday Pickup End Time (use 24-hour time)', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 180 'desc' => __( 'This sets the pickup end time for Friday. Use 24-hour time format.', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 181 181 'id' => 'local_pickup_hours_friday_end', 182 182 'css' => 'width:100px;', … … 186 186 ), 187 187 array( 188 'title' => __( 'Saturday Pickup Start Time (use 24-hour time)', $this->plugin_slug ),189 'desc' => __( 'This sets the pickup start time for Saturday. Use 24-hour time format.', $this->plugin_slug ),188 'title' => __( 'Saturday Pickup Start Time (use 24-hour time)', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 189 'desc' => __( 'This sets the pickup start time for Saturday. Use 24-hour time format.', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 190 190 'id' => 'local_pickup_hours_saturday_start', 191 191 'css' => 'width:100px;', … … 195 195 ), 196 196 array( 197 'title' => __( 'Saturday Pickup End Time (use 24-hour time)', $this->plugin_slug ),198 'desc' => __( 'This sets the pickup end time for Saturday. Use 24-hour time format.', $this->plugin_slug ),197 'title' => __( 'Saturday Pickup End Time (use 24-hour time)', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 198 'desc' => __( 'This sets the pickup end time for Saturday. Use 24-hour time format.', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 199 199 'id' => 'local_pickup_hours_saturday_end', 200 200 'css' => 'width:100px;', … … 204 204 ), 205 205 array( 206 'title' => __( 'Sunday Pickup Start Time (use 24-hour time)', $this->plugin_slug ),207 'desc' => __( 'This sets the pickup start time for Sunday. Use 24-hour time format.', $this->plugin_slug ),206 'title' => __( 'Sunday Pickup Start Time (use 24-hour time)', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 207 'desc' => __( 'This sets the pickup start time for Sunday. Use 24-hour time format.', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 208 208 'id' => 'local_pickup_hours_sunday_start', 209 209 'css' => 'width:100px;', … … 213 213 ), 214 214 array( 215 'title' => __( 'Sunday Pickup End Time (use 24-hour time)', $this->plugin_slug ),216 'desc' => __( 'This sets the pickup end time for Sunday. Use 24-hour time format.', $this->plugin_slug ),215 'title' => __( 'Sunday Pickup End Time (use 24-hour time)', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 216 'desc' => __( 'This sets the pickup end time for Sunday. Use 24-hour time format.', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 217 217 'id' => 'local_pickup_hours_sunday_end', 218 218 'css' => 'width:100px;', … … 222 222 ), 223 223 array( 224 'title' => __( 'Store Closing Days (use MM/DD/YYYY format)', $this->plugin_slug ),225 'desc' => __( 'This sets the days the store is closed. Enter one date per line, in format MM/DD/YYYY.', $this->plugin_slug ),224 'title' => __( 'Store Closing Days (use MM/DD/YYYY format)', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 225 'desc' => __( 'This sets the days the store is closed. Enter one date per line, in format MM/DD/YYYY.', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 226 226 'id' => 'local_pickup_hours_closings', 227 227 'css' => 'width:250px;height:150px;', … … 231 231 ), 232 232 array( 233 'title' => __( 'Pickup Time Interval', $this->plugin_slug ),234 'desc' => __( 'Choose the time interval for allowing local pickup orders.', $this->plugin_slug ),233 'title' => __( 'Pickup Time Interval', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 234 'desc' => __( 'Choose the time interval for allowing local pickup orders.', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 235 235 'id' => 'local_pickup_hours_interval', 236 236 'css' => 'width:100px;', … … 240 240 'desc_tip' => true, 241 241 'options' => array( 242 '5' => __( '5 minutes', $this->plugin_slug ),243 '10' => __( '10 minutes', $this->plugin_slug ),244 '15' => __( '15 minutes', $this->plugin_slug ),245 '20' => __( '20 minutes', $this->plugin_slug ),246 '30' => __( '30 minutes', $this->plugin_slug ),247 '45' => __( '45 minutes', $this->plugin_slug ),248 '60' => __( '1 hour', $this->plugin_slug ),249 '120' => __( '2 hours', $this->plugin_slug ),242 '5' => __( '5 minutes', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 243 '10' => __( '10 minutes', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 244 '15' => __( '15 minutes', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 245 '20' => __( '20 minutes', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 246 '30' => __( '30 minutes', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 247 '45' => __( '45 minutes', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 248 '60' => __( '1 hour', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 249 '120' => __( '2 hours', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 250 250 ) 251 251 ), 252 252 array( 253 'title' => __( 'Pickup Time Delay', $this->plugin_slug ),254 'desc' => __( 'Choose the time delay from the time of ordering for allowing local pickup orders.', $this->plugin_slug ),253 'title' => __( 'Pickup Time Delay', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 254 'desc' => __( 'Choose the time delay from the time of ordering for allowing local pickup orders.', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 255 255 'id' => 'local_pickup_delay_minutes', 256 256 'css' => 'width:100px;', … … 260 260 'desc_tip' => true, 261 261 'options' => array( 262 '5' => __( '5 minutes', $this->plugin_slug ), 263 '10' => __( '10 minutes', $this->plugin_slug ), 264 '15' => __( '15 minutes', $this->plugin_slug ), 265 '20' => __( '20 minutes', $this->plugin_slug ), 266 '30' => __( '30 minutes', $this->plugin_slug ), 267 '45' => __( '45 minutes', $this->plugin_slug ), 268 '60' => __( '1 hour', $this->plugin_slug ), 269 '120' => __( '2 hours', $this->plugin_slug ), 262 '5' => __( '5 minutes', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 263 '10' => __( '10 minutes', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 264 '15' => __( '15 minutes', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 265 '20' => __( '20 minutes', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 266 '30' => __( '30 minutes', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 267 '45' => __( '45 minutes', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 268 '60' => __( '1 hour', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 269 '120' => __( '2 hours', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 270 '240' => __( '4 hours', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 271 '480' => __( '8 hours', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 272 '960' => __( '16 hours', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 273 '1440' => __( '24 hours', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 274 '2160' => __( '36 hours', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 270 275 ) 271 276 ), 272 277 array( 273 'title' => __( 'Pickup Time Days Ahead', $this->plugin_slug ),274 'desc' => __( 'Choose the number of days ahead for allowing local pickup orders.', $this->plugin_slug ),278 'title' => __( 'Pickup Time Days Ahead', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 279 'desc' => __( 'Choose the number of days ahead for allowing local pickup orders.', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 275 280 'id' => 'local_pickup_days_ahead', 276 281 'css' => 'width:100px;', 277 282 'default' => '1', 278 'type' => 'select', 279 'class' => 'chosen_select', 280 'desc_tip' => true, 281 'options' => array( 282 '1' => __( '1 day', $this->plugin_slug ), 283 '2' => __( '2 days', $this->plugin_slug ), 284 '3' => __( '3 days', $this->plugin_slug ), 285 '4' => __( '4 days', $this->plugin_slug ), 286 '5' => __( '5 days', $this->plugin_slug ), 287 '6' => __( '6 days', $this->plugin_slug ), 288 '7' => __( '7 days', $this->plugin_slug ), 289 '8' => __( '8 days', $this->plugin_slug ), 290 '9' => __( '9 days', $this->plugin_slug ), 291 '10' => __( '10 days', $this->plugin_slug ), 292 ) 283 'type' => 'number', 284 'input_attrs' => array( 285 'min' => 0, 286 'step' => 1, 287 ), 288 'desc_tip' => true, 293 289 ), 294 290 array( 'type' => 'sectionend', 'id' => 'pricing_options' ), … … 311 307 $order_meta = get_post_custom( $order->id ); 312 308 313 echo '<p><strong>' . __( 'Pickup Time:', $this->plugin_slug ) . '</strong> ' . $this->pickup_time_select_translatable( $order_meta['_local_pickup_time_select'][0]) . '</p>';309 echo '<p><strong>' . __( 'Pickup Time:', $this->plugin_slug, 'woocommerce-local-pickup-time' ) . '</strong> ' . $this->pickup_time_select_translatable( $order_meta['_local_pickup_time_select'][0]) . '</p>'; 314 310 315 311 } … … 323 319 $value = preg_replace('/(\d)_(\d)/','$1:$2', $value); 324 320 $value = explode('_', $value); 325 $return = __( $value[0], $this->plugin_slug ). ' ' .$value[1];321 $return = __( $value[0], $this->plugin_slug, 'woocommerce-local-pickup-time' ). ' ' .$value[1]; 326 322 return $return; 327 323 } -
woocommerce-local-pickup-time-select/trunk/languages/woocommerce-local-pickup-time-en_US.po
r1678802 r1921268 2 2 msgstr "" 3 3 "Project-Id-Version: WooCommerce Local Pickup Time Select\n" 4 "POT-Creation-Date: 2017-05-11 11:01+0200\n" 4 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-local-" 5 "pickup-time\n" 6 "POT-Creation-Date: 2018-06-12 03:22:16+00:00\n" 5 7 "PO-Revision-Date: 2017-05-11 11:03+0200\n" 6 8 "Last-Translator: Karolína Vyskočilová <karolina@kybernaut.cz>\n" … … 209 211 msgstr "" 210 212 213 #: admin/class-local-pickup-time-admin.php:270 214 msgid "4 hours" 215 msgstr "" 216 217 #: admin/class-local-pickup-time-admin.php:271 218 msgid "8 hours" 219 msgstr "" 220 221 #: admin/class-local-pickup-time-admin.php:272 222 msgid "16 hours" 223 msgstr "" 224 211 225 #: admin/class-local-pickup-time-admin.php:273 226 msgid "24 hours" 227 msgstr "" 228 229 #: admin/class-local-pickup-time-admin.php:274 230 msgid "36 hours" 231 msgstr "" 232 233 #: admin/class-local-pickup-time-admin.php:278 212 234 msgid "Pickup Time Days Ahead" 213 235 msgstr "" 214 236 215 #: admin/class-local-pickup-time-admin.php:27 4237 #: admin/class-local-pickup-time-admin.php:279 216 238 msgid "Choose the number of days ahead for allowing local pickup orders." 217 239 msgstr "" 218 240 219 #: admin/class-local-pickup-time-admin.php:282 220 msgid "1 day" 221 msgstr "" 222 223 #: admin/class-local-pickup-time-admin.php:283 224 msgid "2 days" 225 msgstr "" 226 227 #: admin/class-local-pickup-time-admin.php:284 228 msgid "3 days" 229 msgstr "" 230 231 #: admin/class-local-pickup-time-admin.php:285 232 msgid "4 days" 233 msgstr "" 234 235 #: admin/class-local-pickup-time-admin.php:286 236 msgid "5 days" 237 msgstr "" 238 239 #: admin/class-local-pickup-time-admin.php:287 240 msgid "6 days" 241 msgstr "" 242 243 #: admin/class-local-pickup-time-admin.php:288 244 msgid "7 days" 245 msgstr "" 246 247 #: admin/class-local-pickup-time-admin.php:289 248 msgid "8 days" 249 msgstr "" 250 251 #: admin/class-local-pickup-time-admin.php:290 252 msgid "9 days" 253 msgstr "" 254 255 #: admin/class-local-pickup-time-admin.php:291 256 msgid "10 days" 257 msgstr "" 258 259 #: admin/class-local-pickup-time-admin.php:313 241 #: admin/class-local-pickup-time-admin.php:309 260 242 msgid "Pickup Time:" 261 243 msgstr "" … … 293 275 msgstr "" 294 276 295 #: public/class-local-pickup-time.php:3 29296 #: public/class-local-pickup-time.php: 391277 #: public/class-local-pickup-time.php:331 278 #: public/class-local-pickup-time.php:400 297 279 msgid "Closed today, please check back tomorrow!" 298 280 msgstr "" 299 281 300 #: public/class-local-pickup-time.php:3 57282 #: public/class-local-pickup-time.php:362 301 283 msgid "Today" 302 284 msgstr "" 303 285 304 #: public/class-local-pickup-time.php:41 2305 #: public/class-local-pickup-time.php:4 17306 #: public/class-local-pickup-time.php:4 58286 #: public/class-local-pickup-time.php:416 287 #: public/class-local-pickup-time.php:421 288 #: public/class-local-pickup-time.php:462 307 289 msgid "Pickup Time" 308 290 msgstr "" 309 291 310 #: public/class-local-pickup-time.php:4 36292 #: public/class-local-pickup-time.php:440 311 293 msgid "Please select a pickup time." 312 294 msgstr "" 295 296 #. Plugin Name of the plugin/theme 297 msgid "WooCommerce Local Pickup Time Select" 298 msgstr "" 299 300 #. Author URI of the plugin/theme 301 msgid "http://mattbanks.me" 302 msgstr "" 303 304 #. Description of the plugin/theme 305 msgid "" 306 "Add an an option to WooCommerce checkout pages for Local Pickup that allows " 307 "the user to choose a pickup time." 308 msgstr "" 309 310 #. Author of the plugin/theme 311 msgid "Matt Banks" 312 msgstr "" -
woocommerce-local-pickup-time-select/trunk/languages/woocommerce-local-pickup-time.pot
r1678802 r1921268 1 # Loco Gettext template 2 #, fuzzy 3 msgid "" 4 msgstr "" 5 "Project-Id-Version: WooCommerce Local Pickup Time Select\n" 6 "Report-Msgid-Bugs-To: \n" 7 "POT-Creation-Date: 2017-05-11 11:01+0200\n" 8 "POT-Revision-Date: Fri Jul 10 2015 12:46:48 GMT+0200 (CEST)\n" 9 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 10 "Last-Translator: Matt Banks <mjbanks@gmail.com>\n" 11 "Language-Team: Matt Banks <mjbanks@gmail.com>\n" 12 "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION\n" 1 # Copyright (C) 2018 Matt Banks 2 # This file is distributed under the GPL-2.0+. 3 msgid "" 4 msgstr "" 5 "Project-Id-Version: WooCommerce Local Pickup Time Select 1.3.1\n" 6 "Report-Msgid-Bugs-To: " 7 "https://wordpress.org/support/plugin/woocommerce-local-pickup-time\n" 8 "POT-Creation-Date: 2018-06-12 03:22:16+00:00\n" 13 9 "MIME-Version: 1.0\n" 14 "Content-Type: text/plain; charset= UTF-8\n"10 "Content-Type: text/plain; charset=utf-8\n" 15 11 "Content-Transfer-Encoding: 8bit\n" 12 "PO-Revision-Date: 2018-MO-DA HO:MI+ZONE\n" 13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 14 "Language-Team: LANGUAGE <LL@li.org>\n" 15 "Language: en\n" 16 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 17 "X-Poedit-Country: United States\n" 16 18 "X-Poedit-SourceCharset: UTF-8\n" 17 "X-Generator: Poedit 1.8.12\n" 18 "X-Poedit-Basepath: ..\n" 19 "X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;" 20 "__:1;_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;" 21 "_x:1,2c;_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;" 22 "esc_attr__:1;esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;" 23 "esc_html_x:1,2c;comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2\n" 19 "X-Poedit-KeywordsList: " 20 "__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_" 21 "attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n" 22 "X-Poedit-Basepath: ../\n" 24 23 "X-Poedit-SearchPath-0: .\n" 24 "X-Poedit-Bookmarks: \n" 25 "X-Textdomain-Support: yes\n" 26 "X-Generator: grunt-wp-i18n1.0.2\n" 25 27 26 28 #: admin/class-local-pickup-time-admin.php:92 … … 214 216 msgstr "" 215 217 218 #: admin/class-local-pickup-time-admin.php:270 219 msgid "4 hours" 220 msgstr "" 221 222 #: admin/class-local-pickup-time-admin.php:271 223 msgid "8 hours" 224 msgstr "" 225 226 #: admin/class-local-pickup-time-admin.php:272 227 msgid "16 hours" 228 msgstr "" 229 216 230 #: admin/class-local-pickup-time-admin.php:273 231 msgid "24 hours" 232 msgstr "" 233 234 #: admin/class-local-pickup-time-admin.php:274 235 msgid "36 hours" 236 msgstr "" 237 238 #: admin/class-local-pickup-time-admin.php:278 217 239 msgid "Pickup Time Days Ahead" 218 240 msgstr "" 219 241 220 #: admin/class-local-pickup-time-admin.php:27 4242 #: admin/class-local-pickup-time-admin.php:279 221 243 msgid "Choose the number of days ahead for allowing local pickup orders." 222 244 msgstr "" 223 245 224 #: admin/class-local-pickup-time-admin.php:282 225 msgid "1 day" 226 msgstr "" 227 228 #: admin/class-local-pickup-time-admin.php:283 229 msgid "2 days" 230 msgstr "" 231 232 #: admin/class-local-pickup-time-admin.php:284 233 msgid "3 days" 234 msgstr "" 235 236 #: admin/class-local-pickup-time-admin.php:285 237 msgid "4 days" 238 msgstr "" 239 240 #: admin/class-local-pickup-time-admin.php:286 241 msgid "5 days" 242 msgstr "" 243 244 #: admin/class-local-pickup-time-admin.php:287 245 msgid "6 days" 246 msgstr "" 247 248 #: admin/class-local-pickup-time-admin.php:288 249 msgid "7 days" 250 msgstr "" 251 252 #: admin/class-local-pickup-time-admin.php:289 253 msgid "8 days" 254 msgstr "" 255 256 #: admin/class-local-pickup-time-admin.php:290 257 msgid "9 days" 258 msgstr "" 259 260 #: admin/class-local-pickup-time-admin.php:291 261 msgid "10 days" 262 msgstr "" 263 264 #: admin/class-local-pickup-time-admin.php:313 246 #: admin/class-local-pickup-time-admin.php:309 265 247 msgid "Pickup Time:" 266 248 msgstr "" … … 298 280 msgstr "" 299 281 300 #: public/class-local-pickup-time.php:3 29301 #: public/class-local-pickup-time.php: 391282 #: public/class-local-pickup-time.php:331 283 #: public/class-local-pickup-time.php:400 302 284 msgid "Closed today, please check back tomorrow!" 303 285 msgstr "" 304 286 305 #: public/class-local-pickup-time.php:3 57287 #: public/class-local-pickup-time.php:362 306 288 msgid "Today" 307 289 msgstr "" 308 290 309 #: public/class-local-pickup-time.php:41 2310 #: public/class-local-pickup-time.php:4 17311 #: public/class-local-pickup-time.php:4 58291 #: public/class-local-pickup-time.php:416 292 #: public/class-local-pickup-time.php:421 293 #: public/class-local-pickup-time.php:462 312 294 msgid "Pickup Time" 313 295 msgstr "" 314 296 315 #: public/class-local-pickup-time.php:4 36297 #: public/class-local-pickup-time.php:440 316 298 msgid "Please select a pickup time." 317 299 msgstr "" 300 301 #. Plugin Name of the plugin/theme 302 msgid "WooCommerce Local Pickup Time Select" 303 msgstr "" 304 305 #. Author URI of the plugin/theme 306 msgid "http://mattbanks.me" 307 msgstr "" 308 309 #. Description of the plugin/theme 310 msgid "" 311 "Add an an option to WooCommerce checkout pages for Local Pickup that allows " 312 "the user to choose a pickup time." 313 msgstr "" 314 315 #. Author of the plugin/theme 316 msgid "Matt Banks" 317 msgstr "" -
woocommerce-local-pickup-time-select/trunk/public/class-local-pickup-time.php
r1678802 r1921268 26 26 * @var string 27 27 */ 28 const VERSION = '1.3. 0';28 const VERSION = '1.3.1'; 29 29 30 30 /** … … 275 275 // Get days closed textarea from settings, explode into an array 276 276 $closing_days_raw = trim( get_option( 'local_pickup_hours_closings' ) ); 277 $closing_days = explode( "\n", $closing_days_raw ); 278 $closing_days = array_filter( $closing_days, 'trim' ); 277 $closing_days = explode( "\n", preg_replace('/\v(?:[\v\h]+)/', "\n", $closing_days_raw ) ); 279 278 280 279 // Get delay, interval, and number of days ahead settings … … 291 290 292 291 //Translateble days 293 __( 'Monday', $this->plugin_slug );294 __( 'Tuesday', $this->plugin_slug );295 __( 'Wednesday', $this->plugin_slug );296 __( 'Thursday', $this->plugin_slug );297 __( 'Friday', $this->plugin_slug );298 __( 'Saturday', $this->plugin_slug );299 __( 'Sunday', $this->plugin_slug );292 __( 'Monday', $this->plugin_slug, 'woocommerce-local-pickup-time' ); 293 __( 'Tuesday', $this->plugin_slug, 'woocommerce-local-pickup-time' ); 294 __( 'Wednesday', $this->plugin_slug, 'woocommerce-local-pickup-time' ); 295 __( 'Thursday', $this->plugin_slug, 'woocommerce-local-pickup-time' ); 296 __( 'Friday', $this->plugin_slug, 'woocommerce-local-pickup-time' ); 297 __( 'Saturday', $this->plugin_slug, 'woocommerce-local-pickup-time' ); 298 __( 'Sunday', $this->plugin_slug, 'woocommerce-local-pickup-time' ); 300 299 301 300 // Add empty option 302 $pickup_options[''] = __( 'Select time', $this->plugin_slug );301 $pickup_options[''] = __( 'Select time', $this->plugin_slug, 'woocommerce-local-pickup-time' ); 303 302 304 303 // Loop through all days ahead and add the pickup time options to the array … … 306 305 307 306 // Get the date of current iteration 307 $current_date = date( 'm/d/Y', strtotime( "+$i days" ) ); 308 $current_date_fmt = date( 'l, ' . get_option( 'date_format' ), strtotime( "+$i days" ) ); 308 309 $current_day_name = date( 'l', strtotime( "+$i days" ) ); 309 310 $current_day_name_lower = strtolower( $current_day_name ); … … 314 315 315 316 // Today 316 $tStart = strtotime( $open_time);317 $tEnd = strtotime( $close_time);317 $tStart = strtotime( "$current_date $open_time" ); 318 $tEnd = strtotime( "$current_date $close_time" ); 318 319 $tNow = $tStart; 319 320 $current_time = time(); … … 327 328 328 329 // Set drop down text to let user know store is closed 329 $pickup_options['closed_today'] = __( 'Closed today, please check back tomorrow!', $this->plugin_slug );330 $pickup_options['closed_today'] = __( 'Closed today, please check back tomorrow!', $this->plugin_slug, 'woocommerce-local-pickup-time' ); 330 331 331 332 // Hide Order Review so user doesn't order anything today … … 334 335 335 336 } 337 elseif ( in_array( $current_date, $closing_days ) ) { 338 continue; 339 } 336 340 else { 337 341 // Create array of time options to return to woocommerce_form_field … … 344 348 345 349 // Fix tNow if is pickup possible today 346 if ( $i == 0 ) {347 $todayStart = $tStart;348 $delayStart = strtotime("+$delay_minutes minutes", $current_time); 349 while ( $todayStart <= $delayStart ) {350 $todayStart = strtotime("+$interval minutes", $todayStart); 351 }352 $tNow = $todayStart; 350 $todayStart = $tStart; 351 $delayStart = strtotime("+$delay_minutes minutes", $current_time); 352 353 while ( $todayStart <= $delayStart ) { 354 355 $todayStart = strtotime("+$interval minutes", $todayStart); 356 353 357 } 354 358 359 $tNow = $todayStart; 360 355 361 while ( $tNow <= $tEnd ) { 356 362 357 $day_name = __( 'Today', $this->plugin_slug );358 359 $option_key = $current_da y_name . date( $date_format_key, $tNow );360 $option_value = $day_name . ' ' . date( $date_format, $tNow );363 $day_name = __( 'Today', $this->plugin_slug, 'woocommerce-local-pickup-time' ); 364 365 $option_key = $current_date . date( $date_format_key, $tNow ); 366 $option_value = $day_name . ' @ ' . date( $date_format, $tNow ); 361 367 362 368 $pickup_options[$option_key] = $option_value; 363 369 364 370 $tNow = strtotime( "+$interval minutes", $tNow ); 371 365 372 } 366 373 … … 370 377 } else { 371 378 379 $delayStart = strtotime( "+$delay_minutes minutes" ); 380 372 381 if ( !empty($open_time) && !empty($close_time )) { 382 373 383 while ( $tNow <= $tEnd ) { 374 384 375 $day_name = __( $current_day_name, $this->plugin_slug ); 376 377 $option_key = $current_day_name . date( $date_format_key, $tNow ); 378 $option_value = $day_name . ' ' . date( $date_format, $tNow ); 379 380 $pickup_options[$option_key] = $option_value; 385 if ( $tNow > $delayStart ) { 386 387 $day_name = __( $current_date_fmt, $this->plugin_slug, 'woocommerce-local-pickup-time' ); 388 389 $option_key = $current_date . date( $date_format_key, $tNow ); 390 $option_value = $day_name . ' @ ' . date( $date_format, $tNow ); 391 392 $pickup_options[$option_key] = $option_value; 393 394 } 381 395 382 396 $tNow = strtotime( "+$interval minutes", $tNow ); … … 385 399 386 400 } 401 387 402 } 388 403 … … 392 407 393 408 if ( count($pickup_options) == 1) { 409 394 410 // Set drop down text to let user know store is closed 395 $pickup_options['closed_today'] = __( 'Closed today, please check back tomorrow!', $this->plugin_slug );411 $pickup_options['closed_today'] = __( 'Closed today, please check back tomorrow!', $this->plugin_slug, 'woocommerce-local-pickup-time' ); 396 412 397 413 // Hide Order Review so user doesn't order anything today 398 414 remove_action( 'woocommerce_checkout_order_review', 'woocommerce_order_review', 10 ); 399 415 remove_action( 'woocommerce_checkout_order_review', 'woocommerce_checkout_payment', 20 ); 416 400 417 } 401 418 … … 409 426 */ 410 427 public function time_select( $checkout ) { 411 echo '<div id="local-pickup-time-select"><h2>' . __( 'Pickup Time', $this->plugin_slug ) . '</h2>';428 echo '<div id="local-pickup-time-select"><h2>' . __( 'Pickup Time', $this->plugin_slug, 'woocommerce-local-pickup-time' ) . '</h2>'; 412 429 413 430 woocommerce_form_field( 'local_pickup_time_select', array( 414 431 'type' => 'select', 415 432 'class' => array( 'local-pickup-time-select-field form-row-wide' ), 416 'label' => __( 'Pickup Time', $this->plugin_slug ),433 'label' => __( 'Pickup Time', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 417 434 'required' => true, 418 435 'options' => self::create_hour_options() … … 433 450 434 451 // Check if set, if its not set add an error. 435 if (!$_POST['local_pickup_time_select']) wc_add_notice(__( 'Please select a pickup time.', $this->plugin_slug ), 'error');452 if (!$_POST['local_pickup_time_select']) wc_add_notice(__( 'Please select a pickup time.', $this->plugin_slug, 'woocommerce-local-pickup-time' ), 'error'); 436 453 437 454 } … … 455 472 $value = $this->pickup_time_select_translatable( get_post_meta( $order->id, '_local_pickup_time_select', true )); 456 473 $fields['meta_key'] = array( 457 'label' => __('Pickup Time', $this->plugin_slug ),474 'label' => __('Pickup Time', $this->plugin_slug, 'woocommerce-local-pickup-time'), 458 475 'value' => $value); 459 476 … … 469 486 $value = preg_replace('/(\d)_(\d)/','$1:$2', $value); 470 487 $value = explode('_', $value); 471 $return = __( $value[0], $this->plugin_slug ). ' ' .$value[1];488 $return = __( $value[0], $this->plugin_slug, 'woocommerce-local-pickup-time' ). ' ' .$value[1]; 472 489 return $return; 473 490 } -
woocommerce-local-pickup-time-select/trunk/readme.txt
r1678802 r1921268 1 1 === WooCommerce Local Pickup Time Select === 2 Contributors: mjbanks, vyskoczilova 2 Contributors: mjbanks, vyskoczilova, tnolte 3 3 Donate link: http://mattbanks.me 4 4 Tags: woocommcerce, shipping, local pickup, checkout fields, ecommerce, e-commerce, wordpress ecommerce 5 5 Requires at least: 3.8 6 6 Tested up to: 4.8 7 Stable tag: 1.3. 07 Stable tag: 1.3.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 71 71 == Changelog == 72 72 73 = 1.3.1 = 74 * expands pickup time delay to include 4/8/16/24/36 hours. 75 * changes days ahead setting to allow any number of days via text input. 76 * changes customer display of pickup time to include the date using the WordPress date format setting. 77 * removes closed dates from option list even if it's not today. 78 73 79 = 1.3.0 = 74 80 * fix pickup time for multiple locales and update translations (props vyskoczilova) -
woocommerce-local-pickup-time-select/trunk/woocommerce-local-pickup-time.php
r1678802 r1921268 17 17 * Plugin URI: http://mattbanks.me 18 18 * Description: Add an an option to WooCommerce checkout pages for Local Pickup that allows the user to choose a pickup time. 19 * Version: 1.3. 019 * Version: 1.3.1 20 20 * Author: Matt Banks 21 21 * Author URI: http://mattbanks.me
Note: See TracChangeset
for help on using the changeset viewer.