Skip to content

Commit

Permalink
chore(release): 2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kristos80 committed Mar 27, 2024
1 parent 3c2f9de commit ee88dd8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
"MergeOrg\\WpPluginSort\\": "src"
}
},
"version": "2.3.3"
"version": "2.4.0"
}
2 changes: 1 addition & 1 deletion merge-org-sort.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Description: 📊Sort - Sales Order Ranking Tool | Powered by Merge
* Author: Merge
* Author URI: https://github.com/merge-org
* Version: 2.3.3
* Version: 2.4.0
* Text Domain: merge-org-sort
* Domain Path: /languages
* Requires PHP: 7.4
Expand Down
11 changes: 10 additions & 1 deletion src/WordPress/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@ public function __construct( Constants $constants, SalesPeriodManager $salesPeri

/**
* @param int $products
*
* @return \MergeOrg\WpPluginSort\Data\Sort\Product[]
*/
public function getNonUpdatedSalesPeriodsProducts( int $products = 5 ): array {
$dev = ( $_ENV['APP_ENV'] ?? 'production' ) === 'dev';
$date = date( 'Y-m-d 23:59:59', strtotime( '-2 days' ) );
$date = date( 'Y-m-d 23:59:59', strtotime( '-5 days' ) );
$dev && ( $date = date( 'Y-m-d 00:00:00', strtotime( '+1 days' ) ) );
$dev && ( $products = 100 );

Expand Down Expand Up @@ -90,6 +91,7 @@ public function getNonUpdatedSalesPeriodsProducts( int $products = 5 ): array {

/**
* @param int $productId
*
* @return \MergeOrg\WpPluginSort\Data\Sort\Product
*/
public function getSortProduct( int $productId ): \MergeOrg\WpPluginSort\Data\Sort\Product {
Expand Down Expand Up @@ -221,6 +223,7 @@ public function getUnrecordedOrders( int $orders = 5 ): array {

/**
* @param int $orderId
*
* @return WC_Order|null
*/
private function getOrder( int $orderId ): ?WC_Order {
Expand All @@ -231,6 +234,7 @@ private function getOrder( int $orderId ): ?WC_Order {

/**
* @param int $productId
*
* @return array<string, array<string, int>>
*/
public function getProductSales( int $productId ): array {
Expand All @@ -239,6 +243,7 @@ public function getProductSales( int $productId ): array {

/**
* @param int $orderId
*
* @return void
*/
public function setOrderRecorded( int $orderId ): void {
Expand All @@ -251,6 +256,7 @@ public function setOrderRecorded( int $orderId ): void {

/**
* @param int $orderId
*
* @return bool
*/
public function isOrderRecorded( int $orderId ): bool {
Expand All @@ -259,6 +265,7 @@ public function isOrderRecorded( int $orderId ): bool {

/**
* @param int $productId
*
* @return void
*/
public function updateProductSalesPeriodsLastUpdate( int $productId ): void {
Expand All @@ -270,6 +277,7 @@ public function updateProductSalesPeriodsLastUpdate( int $productId ): void {
* @param int $days
* @param int $purchaseSales
* @param int $quantitySales
*
* @return void
*/
public function updateProductSalesPeriod( int $productId, int $days, int $purchaseSales, int $quantitySales ): void {
Expand All @@ -280,6 +288,7 @@ public function updateProductSalesPeriod( int $productId, int $days, int $purcha
/**
* @param int $productId
* @param array<string, array<string, int>> $sales
*
* @return void
*/
public function updateProductSales( int $productId, array $sales ): void {
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php return array(
'root' => array(
'name' => 'merge-org/wp-plugin-merge-org-sort',
'pretty_version' => '2.3.3',
'version' => '2.3.3.0',
'pretty_version' => '2.4.0',
'version' => '2.4.0.0',
'reference' => null,
'type' => 'library',
'install_path' => __DIR__ . '/../../',
Expand All @@ -11,8 +11,8 @@
),
'versions' => array(
'merge-org/wp-plugin-merge-org-sort' => array(
'pretty_version' => '2.3.3',
'version' => '2.3.3.0',
'pretty_version' => '2.4.0',
'version' => '2.4.0.0',
'reference' => null,
'type' => 'library',
'install_path' => __DIR__ . '/../../',
Expand Down

0 comments on commit ee88dd8

Please sign in to comment.