Skip to content
This repository has been archived by the owner on Oct 12, 2024. It is now read-only.

Commit

Permalink
release/1.3.7 (#40)
Browse files Browse the repository at this point in the history
* Fixes the pickup date/time selection to also use the locale-based date format. (#39)
* Fixes some code formatting failures.
* Updates version number to 1.3.7 for release.
  • Loading branch information
timnolte authored Mar 13, 2019
1 parent ca25593 commit 89559a6
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 19 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
**Tags:** woocommcerce, shipping, local pickup, checkout fields, ecommerce, e-commerce, wordpress ecommerce
**Requires at least:** 4.7
**Tested up to:** 5.1.0
**Stable tag:** 1.3.6
**Stable tag:** 1.3.7
**Requires PHP:** 5.6
**License:** GPLv2 or later
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -69,6 +69,9 @@ The location, by default, is hooked to `woocommerce_admin_order_data_after_billi

## Changelog ##

### 1.3.7 ###
* Fixes an issue with not using the WordPress locale and built-in language pack to translate the pickup date output on checkout.

### 1.3.6 ###
* Fixes WordPress date/time format handling for pickup time selection.
* Fixes issues with some interval combinations.
Expand Down
Binary file modified languages/woocommerce-local-pickup-time-cs_CZ.mo
Binary file not shown.
6 changes: 3 additions & 3 deletions languages/woocommerce-local-pickup-time-cs_CZ.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ msgstr ""
"Project-Id-Version: WooCommerce Local Pickup Time\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-local-"
"pickup-time\n"
"POT-Creation-Date: 2019-03-11 03:26:48+00:00\n"
"POT-Creation-Date: 2019-03-13 03:39:41+00:00\n"
"PO-Revision-Date: 2019-02-01 14:28:47+0000\n"
"Language: cs_CZ\n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -286,7 +286,7 @@ msgstr "Čas vyzvednutí:"
#: admin/class-local-pickup-time-admin.php:356
#: public/class-local-pickup-time.php:517
#: public/class-local-pickup-time.php:524
#: public/class-local-pickup-time.php:575
#: public/class-local-pickup-time.php:576
msgid "Pickup Time"
msgstr "Čas vyzvednutí"

Expand Down Expand Up @@ -326,7 +326,7 @@ msgstr "Vyberte čas"
msgid "Please select a pickup time."
msgstr "vyberte si čas vyzvednutí."

#: public/class-local-pickup-time.php:594
#: public/class-local-pickup-time.php:596
msgid "None"
msgstr "Žádná"

Expand Down
Binary file modified languages/woocommerce-local-pickup-time-en_US.mo
Binary file not shown.
6 changes: 3 additions & 3 deletions languages/woocommerce-local-pickup-time-en_US.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: WooCommerce Local Pickup Time Select\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-local-"
"pickup-time\n"
"POT-Creation-Date: 2019-03-11 03:26:48+00:00\n"
"POT-Creation-Date: 2019-03-13 03:39:41+00:00\n"
"PO-Revision-Date: 2017-05-11 11:03+0200\n"
"Last-Translator: Karolína Vyskočilová <[email protected]>\n"
"Language-Team: Matt Banks <[email protected]>\n"
Expand Down Expand Up @@ -261,7 +261,7 @@ msgstr ""
#: admin/class-local-pickup-time-admin.php:356
#: public/class-local-pickup-time.php:517
#: public/class-local-pickup-time.php:524
#: public/class-local-pickup-time.php:575
#: public/class-local-pickup-time.php:576
msgid "Pickup Time"
msgstr ""

Expand Down Expand Up @@ -301,7 +301,7 @@ msgstr ""
msgid "Please select a pickup time."
msgstr ""

#: public/class-local-pickup-time.php:594
#: public/class-local-pickup-time.php:596
msgid "None"
msgstr ""

Expand Down
8 changes: 4 additions & 4 deletions languages/woocommerce-local-pickup-time.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# This file is distributed under the GPL-2.0+.
msgid ""
msgstr ""
"Project-Id-Version: WooCommerce Local Pickup Time Select 1.3.6\n"
"Project-Id-Version: WooCommerce Local Pickup Time Select 1.3.7\n"
"Report-Msgid-Bugs-To: "
"https://wordpress.org/support/plugin/woocommerce-local-pickup-time\n"
"POT-Creation-Date: 2019-03-11 03:26:48+00:00\n"
"POT-Creation-Date: 2019-03-13 03:39:41+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down Expand Up @@ -266,7 +266,7 @@ msgstr ""
#: admin/class-local-pickup-time-admin.php:356
#: public/class-local-pickup-time.php:517
#: public/class-local-pickup-time.php:524
#: public/class-local-pickup-time.php:575
#: public/class-local-pickup-time.php:576
msgid "Pickup Time"
msgstr ""

Expand Down Expand Up @@ -306,7 +306,7 @@ msgstr ""
msgid "Please select a pickup time."
msgstr ""

#: public/class-local-pickup-time.php:594
#: public/class-local-pickup-time.php:596
msgid "None"
msgstr ""

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "woocommerce-local-pickup-time",
"version": "1.3.6",
"version": "1.3.7",
"description": "Add an an option to WooCommerce checkout pages for Local Pickup that allows the user to choose a pickup time.",
"main": "Gruntfile.js",
"scripts": {
Expand Down
12 changes: 7 additions & 5 deletions public/class-local-pickup-time.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Local_Pickup_Time {
*
* @var string
*/
const VERSION = '1.3.6';
const VERSION = '1.3.7';

/**
* Unique identifier for plugin.
Expand Down Expand Up @@ -498,7 +498,7 @@ public function build_pickup_time_intervals( $pickup_timestamp, $minutes_interva

foreach ( $pickup_dateperiod as $pickup_datetime ) {

$pickup_day_options[ "{$pickup_datetime->getTimestamp()}" ] = $pickup_datetime->format( $this->date_format . ' @ ' . $this->time_format );
$pickup_day_options[ "{$pickup_datetime->getTimestamp()}" ] = $this->pickup_time_select_translatable( $pickup_datetime->getTimestamp(), ' @ ' );

}

Expand Down Expand Up @@ -567,6 +567,7 @@ public function update_order_meta( $order_id ) {
* @param array $fields The array of pickup time fields.
* @param boolean $sent_to_admin Flag that indicates whether the email is being sent to an admin user or not.
* @param object $order The order object that holds all the order attributes.
* @return array The array of order email fields including the pickup time field.
*/
public function update_order_email_fields( $fields, $sent_to_admin, $order ) {

Expand All @@ -584,10 +585,11 @@ public function update_order_email_fields( $fields, $sent_to_admin, $order ) {
*
* @since 1.3.0
*
* @param string $value The pikcup time meta value for an order.
* @param string $value The pickup time meta value for an order.
* @param string $separator The separator to use between the date & the time. (Default = ' ').
* @eturn string The translated value of the order pickup time.
*/
public function pickup_time_select_translatable( $value ) {
public function pickup_time_select_translatable( $value, $separator = ' ' ) {

// Only attempt date/time adjustments when a value is set.
if ( empty( $value ) ) {
Expand All @@ -604,7 +606,7 @@ public function pickup_time_select_translatable( $value ) {
// When using the latest pickup time meta of a timestamp return using the WordPress i18n method.
if ( preg_match( '/^\d*$/', $value ) ) {

return date_i18n( $this->date_format, $value ) . ' ' . date( $this->time_format, $value );
return date_i18n( $this->date_format, $value ) . $separator . date( $this->time_format, $value );

}

Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: http://mattbanks.me
Tags: woocommcerce, shipping, local pickup, checkout fields, ecommerce, e-commerce, wordpress ecommerce
Requires at least: 4.7
Tested up to: 5.1.0
Stable tag: 1.3.6
Stable tag: 1.3.7
Requires PHP: 5.6
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -69,6 +69,9 @@ The location, by default, is hooked to `woocommerce_admin_order_data_after_billi

== Changelog ==

= 1.3.7 =
* Fixes an issue with not using the WordPress locale and built-in language pack to translate the pickup date output on checkout.

= 1.3.6 =
* Fixes WordPress date/time format handling for pickup time selection.
* Fixes issues with some interval combinations.
Expand Down
2 changes: 1 addition & 1 deletion woocommerce-local-pickup-time.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Plugin Name: WooCommerce Local Pickup Time Select
* Plugin URI: http://mattbanks.me
* Description: Add an an option to WooCommerce checkout pages for Local Pickup that allows the user to choose a pickup time.
* Version: 1.3.6
* Version: 1.3.7
* Author: Matt Banks
* Author URI: http://mattbanks.me
* Text Domain: woocommerce-local-pickup-time
Expand Down

0 comments on commit 89559a6

Please sign in to comment.