Skip to content

Commit

Permalink
Update minor version to 5.4.1 and use unix_timestamp instead of now (#5)
Browse files Browse the repository at this point in the history
* Changed NOW() to UNIX_TIMESTAMP in the order_tracking_number insert, to use an integer timestamp instead of a string. Changed the minor version in both the Main.php and main.yaml to 1 as the current version of the plugin is actually 5.4.1.

* Added changelog for 5.4.1 minor version update

Co-authored-by: Dan Poage <daniel.poage@shipstation.com>
  • Loading branch information
danpoage and Dan Poage committed Jan 8, 2021
1 parent 2443947 commit 8940881
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion classes/XLite/Module/ShipStation/Api/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static function getMajorVersion()
*/
public static function getMinorVersion()
{
return '2';
return '1';
}

/**
Expand Down
2 changes: 1 addition & 1 deletion classes/XLite/Module/ShipStation/Api/Model/Repo/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function addOrderTrackingNumber($intOrderNumber = 0, $intTrackingNumber =
{
$version = \XLite\Module\ShipStation\Api\Main::getMajorVersion();
if (floatval($version) >= 5.4) {
\Includes\Utils\Database::execute("INSERT INTO " . \Includes\Utils\Database::getTablesPrefix() . "order_tracking_number (order_id, value, creationDate) VALUES (:order_id, :tracking_number, NOW())", array(
\Includes\Utils\Database::execute("INSERT INTO " . \Includes\Utils\Database::getTablesPrefix() . "order_tracking_number (order_id, value, creationDate) VALUES (:order_id, :tracking_number, UNIX_TIMESTAMP())", array(
':order_id' => $intOrderNumber,
':tracking_number' => $intTrackingNumber
));
Expand Down
2 changes: 2 additions & 0 deletions classes/XLite/Module/ShipStation/Api/changelog/5.4/1/0.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Version 5.4.1
01/05/2021 - [Bug] Small fixes for versions compatibility
2 changes: 1 addition & 1 deletion classes/XLite/Module/ShipStation/Api/main.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 5.4.2
version: 5.4.1
type: common
authorName: ShipStation
moduleName: ShipStation
Expand Down

0 comments on commit 8940881

Please sign in to comment.