Plugin Directory

Changeset 1921268


Ignore:
Timestamp:
08/07/2018 09:11:22 PM (8 years ago)
Author:
mjbanks
Message:

updates to pickup time options

Location:
woocommerce-local-pickup-time-select/trunk
Files:
3 added
7 edited

Legend:

Unmodified
Added
Removed
  • woocommerce-local-pickup-time-select/trunk/admin/class-local-pickup-time-admin.php

    r1678802 r1921268  
    9090        $updated_settings[] = array(
    9191            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' ),
    9393                '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' ),
    9595                'id' => 'local_pickup_hours'
    9696            ),
    9797            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' ),
    100100                'id'       => 'local_pickup_hours_monday_start',
    101101                'css'      => 'width:100px;',
     
    105105            ),
    106106            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' ),
    109109                'id'       => 'local_pickup_hours_monday_end',
    110110                'css'      => 'width:100px;',
     
    114114            ),
    115115            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' ),
    118118                'id'       => 'local_pickup_hours_tuesday_start',
    119119                'css'      => 'width:100px;',
     
    123123            ),
    124124            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' ),
    127127                'id'       => 'local_pickup_hours_tuesday_end',
    128128                'css'      => 'width:100px;',
     
    132132            ),
    133133            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' ),
    136136                'id'       => 'local_pickup_hours_wednesday_start',
    137137                'css'      => 'width:100px;',
     
    141141            ),
    142142            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' ),
    145145                'id'       => 'local_pickup_hours_wednesday_end',
    146146                'css'      => 'width:100px;',
     
    150150            ),
    151151            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' ),
    154154                'id'       => 'local_pickup_hours_thursday_start',
    155155                'css'      => 'width:100px;',
     
    159159            ),
    160160            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' ),
    163163                'id'       => 'local_pickup_hours_thursday_end',
    164164                'css'      => 'width:100px;',
     
    168168            ),
    169169            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' ),
    172172                'id'       => 'local_pickup_hours_friday_start',
    173173                'css'      => 'width:100px;',
     
    177177            ),
    178178            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' ),
    181181                'id'       => 'local_pickup_hours_friday_end',
    182182                'css'      => 'width:100px;',
     
    186186            ),
    187187            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' ),
    190190                'id'       => 'local_pickup_hours_saturday_start',
    191191                'css'      => 'width:100px;',
     
    195195            ),
    196196            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' ),
    199199                'id'       => 'local_pickup_hours_saturday_end',
    200200                'css'      => 'width:100px;',
     
    204204            ),
    205205            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' ),
    208208                'id'       => 'local_pickup_hours_sunday_start',
    209209                'css'      => 'width:100px;',
     
    213213            ),
    214214            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' ),
    217217                'id'       => 'local_pickup_hours_sunday_end',
    218218                'css'      => 'width:100px;',
     
    222222            ),
    223223            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' ),
    226226                'id'       => 'local_pickup_hours_closings',
    227227                'css'      => 'width:250px;height:150px;',
     
    231231            ),
    232232            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' ),
    235235                'id'       => 'local_pickup_hours_interval',
    236236                'css'      => 'width:100px;',
     
    240240                'desc_tip' =>  true,
    241241                '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' ),
    250250                )
    251251            ),
    252252            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' ),
    255255                'id'       => 'local_pickup_delay_minutes',
    256256                'css'      => 'width:100px;',
     
    260260                'desc_tip' =>  true,
    261261                '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' ),
    270275                )
    271276            ),
    272277            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' ),
    275280                'id'       => 'local_pickup_days_ahead',
    276281                'css'      => 'width:100px;',
    277282                '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,
    293289            ),
    294290            array( 'type' => 'sectionend', 'id' => 'pricing_options' ),
     
    311307        $order_meta = get_post_custom( $order->id );
    312308
    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>';
    314310
    315311    }
     
    323319        $value = preg_replace('/(\d)_(\d)/','$1:$2', $value);
    324320        $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];
    326322        return $return;
    327323    }
  • woocommerce-local-pickup-time-select/trunk/languages/woocommerce-local-pickup-time-en_US.po

    r1678802 r1921268  
    22msgstr ""
    33"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"
    57"PO-Revision-Date: 2017-05-11 11:03+0200\n"
    68"Last-Translator: Karolína Vyskočilová <karolina@kybernaut.cz>\n"
     
    209211msgstr ""
    210212
     213#: admin/class-local-pickup-time-admin.php:270
     214msgid "4 hours"
     215msgstr ""
     216
     217#: admin/class-local-pickup-time-admin.php:271
     218msgid "8 hours"
     219msgstr ""
     220
     221#: admin/class-local-pickup-time-admin.php:272
     222msgid "16 hours"
     223msgstr ""
     224
    211225#: admin/class-local-pickup-time-admin.php:273
     226msgid "24 hours"
     227msgstr ""
     228
     229#: admin/class-local-pickup-time-admin.php:274
     230msgid "36 hours"
     231msgstr ""
     232
     233#: admin/class-local-pickup-time-admin.php:278
    212234msgid "Pickup Time Days Ahead"
    213235msgstr ""
    214236
    215 #: admin/class-local-pickup-time-admin.php:274
     237#: admin/class-local-pickup-time-admin.php:279
    216238msgid "Choose the number of days ahead for allowing local pickup orders."
    217239msgstr ""
    218240
    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
    260242msgid "Pickup Time:"
    261243msgstr ""
     
    293275msgstr ""
    294276
    295 #: public/class-local-pickup-time.php:329
    296 #: public/class-local-pickup-time.php:391
     277#: public/class-local-pickup-time.php:331
     278#: public/class-local-pickup-time.php:400
    297279msgid "Closed today, please check back tomorrow!"
    298280msgstr ""
    299281
    300 #: public/class-local-pickup-time.php:357
     282#: public/class-local-pickup-time.php:362
    301283msgid "Today"
    302284msgstr ""
    303285
    304 #: public/class-local-pickup-time.php:412
    305 #: public/class-local-pickup-time.php:417
    306 #: public/class-local-pickup-time.php:458
     286#: public/class-local-pickup-time.php:416
     287#: public/class-local-pickup-time.php:421
     288#: public/class-local-pickup-time.php:462
    307289msgid "Pickup Time"
    308290msgstr ""
    309291
    310 #: public/class-local-pickup-time.php:436
     292#: public/class-local-pickup-time.php:440
    311293msgid "Please select a pickup time."
    312294msgstr ""
     295
     296#. Plugin Name of the plugin/theme
     297msgid "WooCommerce Local Pickup Time Select"
     298msgstr ""
     299
     300#. Author URI of the plugin/theme
     301msgid "http://mattbanks.me"
     302msgstr ""
     303
     304#. Description of the plugin/theme
     305msgid ""
     306"Add an an option to WooCommerce checkout pages for Local Pickup that allows "
     307"the user to choose a pickup time."
     308msgstr ""
     309
     310#. Author of the plugin/theme
     311msgid "Matt Banks"
     312msgstr ""
  • 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+.
     3msgid ""
     4msgstr ""
     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"
    139"MIME-Version: 1.0\n"
    14 "Content-Type: text/plain; charset=UTF-8\n"
     10"Content-Type: text/plain; charset=utf-8\n"
    1511"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"
    1618"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"
    2423"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"
    2527
    2628#: admin/class-local-pickup-time-admin.php:92
     
    214216msgstr ""
    215217
     218#: admin/class-local-pickup-time-admin.php:270
     219msgid "4 hours"
     220msgstr ""
     221
     222#: admin/class-local-pickup-time-admin.php:271
     223msgid "8 hours"
     224msgstr ""
     225
     226#: admin/class-local-pickup-time-admin.php:272
     227msgid "16 hours"
     228msgstr ""
     229
    216230#: admin/class-local-pickup-time-admin.php:273
     231msgid "24 hours"
     232msgstr ""
     233
     234#: admin/class-local-pickup-time-admin.php:274
     235msgid "36 hours"
     236msgstr ""
     237
     238#: admin/class-local-pickup-time-admin.php:278
    217239msgid "Pickup Time Days Ahead"
    218240msgstr ""
    219241
    220 #: admin/class-local-pickup-time-admin.php:274
     242#: admin/class-local-pickup-time-admin.php:279
    221243msgid "Choose the number of days ahead for allowing local pickup orders."
    222244msgstr ""
    223245
    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
    265247msgid "Pickup Time:"
    266248msgstr ""
     
    298280msgstr ""
    299281
    300 #: public/class-local-pickup-time.php:329
    301 #: public/class-local-pickup-time.php:391
     282#: public/class-local-pickup-time.php:331
     283#: public/class-local-pickup-time.php:400
    302284msgid "Closed today, please check back tomorrow!"
    303285msgstr ""
    304286
    305 #: public/class-local-pickup-time.php:357
     287#: public/class-local-pickup-time.php:362
    306288msgid "Today"
    307289msgstr ""
    308290
    309 #: public/class-local-pickup-time.php:412
    310 #: public/class-local-pickup-time.php:417
    311 #: public/class-local-pickup-time.php:458
     291#: public/class-local-pickup-time.php:416
     292#: public/class-local-pickup-time.php:421
     293#: public/class-local-pickup-time.php:462
    312294msgid "Pickup Time"
    313295msgstr ""
    314296
    315 #: public/class-local-pickup-time.php:436
     297#: public/class-local-pickup-time.php:440
    316298msgid "Please select a pickup time."
    317299msgstr ""
     300
     301#. Plugin Name of the plugin/theme
     302msgid "WooCommerce Local Pickup Time Select"
     303msgstr ""
     304
     305#. Author URI of the plugin/theme
     306msgid "http://mattbanks.me"
     307msgstr ""
     308
     309#. Description of the plugin/theme
     310msgid ""
     311"Add an an option to WooCommerce checkout pages for Local Pickup that allows "
     312"the user to choose a pickup time."
     313msgstr ""
     314
     315#. Author of the plugin/theme
     316msgid "Matt Banks"
     317msgstr ""
  • woocommerce-local-pickup-time-select/trunk/public/class-local-pickup-time.php

    r1678802 r1921268  
    2626     * @var     string
    2727     */
    28     const VERSION = '1.3.0';
     28    const VERSION = '1.3.1';
    2929
    3030    /**
     
    275275        // Get days closed textarea from settings, explode into an array
    276276        $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 ) );
    279278
    280279        // Get delay, interval, and number of days ahead settings
     
    291290
    292291        //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' );
    300299
    301300        // Add empty option
    302         $pickup_options[''] = __( 'Select time', $this->plugin_slug );
     301        $pickup_options[''] = __( 'Select time', $this->plugin_slug, 'woocommerce-local-pickup-time' );
    303302
    304303        // Loop through all days ahead and add the pickup time options to the array
     
    306305
    307306            // 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" ) );
    308309            $current_day_name = date( 'l', strtotime( "+$i days" ) );
    309310            $current_day_name_lower = strtolower( $current_day_name );
     
    314315
    315316            // 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" );
    318319            $tNow = $tStart;
    319320            $current_time = time();
     
    327328
    328329                // 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' );
    330331
    331332                // Hide Order Review so user doesn't order anything today
     
    334335
    335336            }
     337            elseif ( in_array( $current_date, $closing_days ) ) {
     338                continue;
     339            }
    336340            else {
    337341                // Create array of time options to return to woocommerce_form_field
     
    344348
    345349                        // 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
    353357                        }
    354358
     359                        $tNow = $todayStart;
     360
    355361                        while ( $tNow <= $tEnd ) {
    356362
    357                             $day_name = __( 'Today', $this->plugin_slug );
    358 
    359                             $option_key = $current_day_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 );
    361367
    362368                            $pickup_options[$option_key] = $option_value;
    363369
    364370                            $tNow = strtotime( "+$interval minutes", $tNow );
     371
    365372                        }
    366373
     
    370377                } else {
    371378
     379                    $delayStart = strtotime( "+$delay_minutes minutes" );
     380
    372381                    if ( !empty($open_time) && !empty($close_time )) {
     382
    373383                        while ( $tNow <= $tEnd ) {
    374384
    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                            }
    381395
    382396                            $tNow = strtotime( "+$interval minutes", $tNow );
     
    385399
    386400                    }
     401
    387402                }
    388403
     
    392407
    393408        if ( count($pickup_options) == 1) {
     409
    394410            // 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' );
    396412
    397413            // Hide Order Review so user doesn't order anything today
    398414            remove_action( 'woocommerce_checkout_order_review', 'woocommerce_order_review', 10 );
    399415            remove_action( 'woocommerce_checkout_order_review', 'woocommerce_checkout_payment', 20 );
     416
    400417        }
    401418
     
    409426     */
    410427    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>';
    412429
    413430        woocommerce_form_field( 'local_pickup_time_select', array(
    414431            'type'          => 'select',
    415432            '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' ),
    417434            'required'      => true,
    418435            'options'       => self::create_hour_options()
     
    433450
    434451        // 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');
    436453
    437454    }
     
    455472        $value = $this->pickup_time_select_translatable( get_post_meta( $order->id, '_local_pickup_time_select', true ));
    456473        $fields['meta_key'] = array(
    457                 'label' => __('Pickup Time', $this->plugin_slug),
     474                'label' => __('Pickup Time', $this->plugin_slug, 'woocommerce-local-pickup-time'),
    458475                'value' => $value);
    459476
     
    469486        $value = preg_replace('/(\d)_(\d)/','$1:$2', $value);
    470487        $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];
    472489        return $return;
    473490    }
  • woocommerce-local-pickup-time-select/trunk/readme.txt

    r1678802 r1921268  
    11=== WooCommerce Local Pickup Time Select ===
    2 Contributors: mjbanks, vyskoczilova
     2Contributors: mjbanks, vyskoczilova, tnolte
    33Donate link: http://mattbanks.me
    44Tags: woocommcerce, shipping, local pickup, checkout fields, ecommerce, e-commerce, wordpress ecommerce
    55Requires at least: 3.8
    66Tested up to: 4.8
    7 Stable tag: 1.3.0
     7Stable tag: 1.3.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7171== Changelog ==
    7272
     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
    7379= 1.3.0 =
    7480* fix pickup time for multiple locales and update translations (props vyskoczilova)
  • woocommerce-local-pickup-time-select/trunk/woocommerce-local-pickup-time.php

    r1678802 r1921268  
    1717 * Plugin URI:        http://mattbanks.me
    1818 * 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.0
     19 * Version:           1.3.1
    2020 * Author:            Matt Banks
    2121 * Author URI:        http://mattbanks.me
Note: See TracChangeset for help on using the changeset viewer.